Skip to content

Commit 41c83ec

Browse files
committed
Update version to 0.23.0
1 parent cecc0b3 commit 41c83ec

File tree

40 files changed

+168
-189
lines changed

40 files changed

+168
-189
lines changed

README.md

Lines changed: 51 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
<!-- Delete on release branches -->
2-
<img src='https://s3-us-west-2.amazonaws.com/cortex-public/logo.png' height='42'>
3-
4-
<br>
5-
6-
<!-- Delete on release branches -->
7-
<!-- CORTEX_VERSION_README_MINOR -->
8-
9-
[install](https://docs.cortex.dev/install)[documentation](https://docs.cortex.dev)[examples](https://github.com/cortexlabs/cortex/tree/0.22/examples)[support](https://gitter.im/cortexlabs/cortex)
10-
111
# Deploy machine learning models to production
122

133
Cortex is an open source platform for deploying, managing, and scaling machine learning in production.
@@ -16,53 +6,47 @@ Cortex is an open source platform for deploying, managing, and scaling machine l
166

177
## Model serving infrastructure
188

19-
* Supports deploying TensorFlow, PyTorch, sklearn and other models as realtime or batch APIs
20-
* Ensures high availability with availability zones and automated instance restarts
21-
* Scales to handle production workloads with request-based autoscaling
22-
* Runs inference on spot instances with on-demand backups
23-
* Manages traffic splitting for A/B testing
9+
* Supports deploying TensorFlow, PyTorch, sklearn and other models as realtime or batch APIs.
10+
* Ensures high availability with availability zones and automated instance restarts.
11+
* Runs inference on spot instances with on-demand backups.
12+
* Autoscales to handle production workloads.
2413

25-
#### Configure your cluster:
14+
#### Configure Cortex
2615

2716
```yaml
2817
# cluster.yaml
2918

3019
region: us-east-1
31-
availability_zones: [us-east-1a, us-east-1b]
32-
api_gateway: public
3320
instance_type: g4dn.xlarge
21+
spot: true
3422
min_instances: 10
3523
max_instances: 100
36-
spot: true
3724
```
3825
39-
#### Spin up your cluster on your AWS account:
26+
#### Spin up Cortex on your AWS account
4027
4128
```text
4229
$ cortex cluster up --config cluster.yaml
4330

4431
○ configuring autoscaling ✓
4532
○ configuring networking ✓
4633
○ configuring logging ✓
47-
○ configuring metrics dashboard ✓
4834

4935
cortex is ready!
5036
```
5137

5238
<br>
5339

54-
## Reproducible model deployments
40+
## Reproducible deployments
5541

56-
* Implement request handling in Python
57-
* Customize compute, autoscaling, and networking for each API
58-
* Package dependencies, code, and configuration for reproducible deployments
59-
* Test locally before deploying to your cluster
42+
* Package dependencies, code, and configuration for reproducible deployments.
43+
* Configure compute, autoscaling, and networking for each API.
44+
* Integrate with your data science platform or CI/CD system.
45+
* Test locally before deploying to your cluster.
6046

61-
#### Implement a predictor:
47+
#### Implement a predictor
6248

6349
```python
64-
# predictor.py
65-
6650
from transformers import pipeline
6751

6852
class PythonPredictor:
@@ -73,70 +57,63 @@ class PythonPredictor:
7357
return self.model(payload["text"])[0]
7458
```
7559

76-
#### Configure an API:
77-
78-
```yaml
79-
# cortex.yaml
80-
81-
name: text-generator
82-
kind: RealtimeAPI
83-
predictor:
84-
path: predictor.py
85-
compute:
86-
gpu: 1
87-
mem: 4Gi
88-
autoscaling:
89-
min_replicas: 1
90-
max_replicas: 10
91-
networking:
92-
api_gateway: public
93-
```
94-
95-
#### Deploy to production:
96-
97-
```text
98-
$ cortex deploy cortex.yaml
99-
100-
creating https://example.com/text-generator
101-
102-
$ curl https://example.com/text-generator \
103-
-X POST -H "Content-Type: application/json" \
104-
-d '{"text": "deploy machine learning models to"}'
60+
#### Configure an API
10561

106-
"deploy machine learning models to production"
62+
```python
63+
api_spec = {
64+
"name": "text-generator",
65+
"kind": "RealtimeAPI",
66+
"compute": {
67+
"gpu": 1,
68+
"mem": "8Gi",
69+
},
70+
"autoscaling": {
71+
"min_replicas": 1,
72+
"max_replicas": 10
73+
},
74+
"networking": {
75+
"api_gateway": "public"
76+
}
77+
}
10778
```
10879

10980
<br>
11081

111-
## API management
82+
## Scalable machine learning APIs
11283

113-
* Monitor API performance
114-
* Aggregate and stream logs
115-
* Customize prediction tracking
116-
* Update APIs without downtime
84+
* Scale to handle production workloads with request-based autoscaling.
85+
* Stream performance metrics and logs to any monitoring tool.
86+
* Serve many models efficiently with multi model caching.
87+
* Configure traffic splitting for A/B testing.
88+
* Update APIs without downtime.
11789

118-
#### Manage your APIs:
90+
#### Deploy to your cluster
11991

120-
```text
121-
$ cortex get
92+
```python
93+
import cortex
12294

123-
realtime api status replicas last update latency requests
95+
cx = cortex.client()
96+
cx.deploy(api_spec, predictor=PythonPredictor)
12497

125-
text-generator live 34 9h 247ms 71828
126-
object-detector live 13 15h 23ms 828459
98+
# creating https://example.com/text-generator
99+
```
127100

101+
#### Consume your API
128102

129-
batch api running jobs last update
103+
```python
104+
import requests
130105

131-
image-classifier 5 10h
106+
endpoint = "https://example.com/text-generator"
107+
payload = {"text": "hello world"}
108+
prediction = requests.post(endpoint, payload)
132109
```
133110

134111
<br>
135112

136113
## Get started
137114

138-
```text
139-
$ pip install cortex
115+
```bash
116+
pip install cortex
140117
```
141118

142119
See the [installation guide](https://docs.cortex.dev/install) for next steps.

build/build-image.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ set -euo pipefail
1919

2020
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. >/dev/null && pwd)"
2121

22-
CORTEX_VERSION=master
22+
CORTEX_VERSION=0.23.0
2323
REGISTRY_URL=quay.io
2424

2525
image=$1

build/cli.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ set -euo pipefail
1919

2020
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. >/dev/null && pwd)"
2121

22-
CORTEX_VERSION=master
22+
CORTEX_VERSION=0.23.0
2323

2424
arg1=${1:-""}
2525
upload="false"

build/push-image.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
set -euo pipefail
1919

20-
CORTEX_VERSION=master
20+
CORTEX_VERSION=0.23.0
2121
REGISTRY_URL=quay.io
2222

2323
image=$1

docs/aws/install.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ cortex env default aws
1818
```
1919

2020
<!-- CORTEX_VERSION_MINOR -->
21-
Try the [tutorial](../../examples/pytorch/text-generator/README.md) or deploy one of our [examples](https://github.com/cortexlabs/cortex/tree/master/examples).
21+
Try the [tutorial](../../examples/pytorch/text-generator/README.md) or deploy one of our [examples](https://github.com/cortexlabs/cortex/tree/0.23/examples).
2222

2323
## Configure Cortex
2424

@@ -63,7 +63,7 @@ nat_gateway: none
6363
api_load_balancer_scheme: internet-facing
6464

6565
# operator load balancer scheme [internet-facing | internal]
66-
# note: if using "internal", you must configure VPC Peering to connect your CLI to your cluster operator (https://docs.cortex.dev/v/master/aws/vpc-peering)
66+
# note: if using "internal", you must configure VPC Peering to connect your CLI to your cluster operator (https://docs.cortex.dev/v/0.23/aws/vpc-peering)
6767
operator_load_balancer_scheme: internet-facing
6868

6969
# API Gateway [public (API Gateway will be used by default, can be disabled per API) | none (API Gateway will be disabled for all APIs)]
@@ -86,19 +86,19 @@ The docker images used by the Cortex cluster can also be overridden, although th
8686
8787
<!-- CORTEX_VERSION_BRANCH_STABLE -->
8888
```yaml
89-
image_operator: quay.io/cortexlabs/operator:master
90-
image_manager: quay.io/cortexlabs/manager:master
91-
image_downloader: quay.io/cortexlabs/downloader:master
92-
image_request_monitor: quay.io/cortexlabs/request-monitor:master
93-
image_cluster_autoscaler: quay.io/cortexlabs/cluster-autoscaler:master
94-
image_metrics_server: quay.io/cortexlabs/metrics-server:master
95-
image_inferentia: quay.io/cortexlabs/inferentia:master
96-
image_neuron_rtd: quay.io/cortexlabs/neuron-rtd:master
97-
image_nvidia: quay.io/cortexlabs/nvidia:master
98-
image_fluentd: quay.io/cortexlabs/fluentd:master
99-
image_statsd: quay.io/cortexlabs/statsd:master
100-
image_istio_proxy: quay.io/cortexlabs/istio-proxy:master
101-
image_istio_pilot: quay.io/cortexlabs/istio-pilot:master
89+
image_operator: quay.io/cortexlabs/operator:0.23.0
90+
image_manager: quay.io/cortexlabs/manager:0.23.0
91+
image_downloader: quay.io/cortexlabs/downloader:0.23.0
92+
image_request_monitor: quay.io/cortexlabs/request-monitor:0.23.0
93+
image_cluster_autoscaler: quay.io/cortexlabs/cluster-autoscaler:0.23.0
94+
image_metrics_server: quay.io/cortexlabs/metrics-server:0.23.0
95+
image_inferentia: quay.io/cortexlabs/inferentia:0.23.0
96+
image_neuron_rtd: quay.io/cortexlabs/neuron-rtd:0.23.0
97+
image_nvidia: quay.io/cortexlabs/nvidia:0.23.0
98+
image_fluentd: quay.io/cortexlabs/fluentd:0.23.0
99+
image_statsd: quay.io/cortexlabs/statsd:0.23.0
100+
image_istio_proxy: quay.io/cortexlabs/istio-proxy:0.23.0
101+
image_istio_pilot: quay.io/cortexlabs/istio-pilot:0.23.0
102102
```
103103
104104
The default docker images used for your Predictors are listed in the instructions for [system packages](../deployments/system-packages.md), and can be overridden in your [Realtime API configuration](../deployments/realtime-api/api-configuration.md) and in your [Batch API configuration](../deployments/batch-api/api-configuration.md).

docs/aws/update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ cortex cluster configure # or: cortex cluster configure --config cluster.yaml
1515
cortex cluster down
1616

1717
# update your CLI
18-
bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/master/get-cli.sh)"
18+
bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/0.23/get-cli.sh)"
1919

2020
# confirm version
2121
cortex version

docs/deployments/batch-api/api-configuration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Reference the section below which corresponds to your Predictor type: [Python](#
1515
path: <string> # path to a python file with a PythonPredictor class definition, relative to the Cortex root (required)
1616
config: <string: value> # arbitrary dictionary passed to the constructor of the Predictor (can be overridden by config passed in job submission) (optional)
1717
python_path: <string> # path to the root of your Python folder that will be appended to PYTHONPATH (default: folder containing cortex.yaml)
18-
image: <string> # docker image to use for the Predictor (default: quay.io/cortexlabs/python-predictor-cpu:master or quay.io/cortexlabs/python-predictor-gpu:master based on compute)
18+
image: <string> # docker image to use for the Predictor (default: quay.io/cortexlabs/python-predictor-cpu:0.23.0 or quay.io/cortexlabs/python-predictor-gpu:0.23.0 based on compute)
1919
env: <string: string> # dictionary of environment variables
2020
networking:
2121
endpoint: <string> # the endpoint for the API (default: <api_name>)
@@ -50,8 +50,8 @@ See additional documentation for [compute](../compute.md), [networking](../../aw
5050
batch_interval: <duration> # the maximum amount of time to spend waiting for additional requests before running inference on the batch of requests
5151
config: <string: value> # arbitrary dictionary passed to the constructor of the Predictor (can be overridden by config passed in job submission) (optional)
5252
python_path: <string> # path to the root of your Python folder that will be appended to PYTHONPATH (default: folder containing cortex.yaml)
53-
image: <string> # docker image to use for the Predictor (default: quay.io/cortexlabs/tensorflow-predictor:master)
54-
tensorflow_serving_image: <string> # docker image to use for the TensorFlow Serving container (default: quay.io/cortexlabs/tensorflow-serving-gpu:master or quay.io/cortexlabs/tensorflow-serving-cpu:master based on compute)
53+
image: <string> # docker image to use for the Predictor (default: quay.io/cortexlabs/tensorflow-predictor:0.23.0)
54+
tensorflow_serving_image: <string> # docker image to use for the TensorFlow Serving container (default: quay.io/cortexlabs/tensorflow-serving-gpu:0.23.0 or quay.io/cortexlabs/tensorflow-serving-cpu:0.23.0 based on compute)
5555
env: <string: string> # dictionary of environment variables
5656
networking:
5757
endpoint: <string> # the endpoint for the API (default: <api_name>)
@@ -82,7 +82,7 @@ See additional documentation for [compute](../compute.md), [networking](../../aw
8282
...
8383
config: <string: value> # arbitrary dictionary passed to the constructor of the Predictor (can be overridden by config passed in job submission) (optional)
8484
python_path: <string> # path to the root of your Python folder that will be appended to PYTHONPATH (default: folder containing cortex.yaml)
85-
image: <string> # docker image to use for the Predictor (default: quay.io/cortexlabs/onnx-predictor-gpu:master or quay.io/cortexlabs/onnx-predictor-cpu:master based on compute)
85+
image: <string> # docker image to use for the Predictor (default: quay.io/cortexlabs/onnx-predictor-gpu:0.23.0 or quay.io/cortexlabs/onnx-predictor-cpu:0.23.0 based on compute)
8686
env: <string: string> # dictionary of environment variables
8787
networking:
8888
endpoint: <string> # the endpoint for the API (default: <api_name>)

docs/deployments/batch-api/deployment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,4 @@ deleting my-api
122122
<!-- CORTEX_VERSION_MINOR -->
123123
* [Tutorial](../../../examples/batch/image-classifier/README.md) provides a step-by-step walkthrough of deploying an image classification batch API
124124
* [CLI documentation](../../miscellaneous/cli.md) lists all CLI commands
125-
* [Examples](https://github.com/cortexlabs/cortex/tree/master/examples/batch) demonstrate how to deploy models from common ML libraries
125+
* [Examples](https://github.com/cortexlabs/cortex/tree/0.23/examples/batch) demonstrate how to deploy models from common ML libraries

0 commit comments

Comments
 (0)