From 13097178cfbd3c9057c676be39971ec25121ddfb Mon Sep 17 00:00:00 2001 From: David Eliahu Date: Tue, 11 May 2021 08:59:13 -0700 Subject: [PATCH] Update version to 0.35.0 --- build/build-image.sh | 2 +- build/cli.sh | 2 +- build/push-image.sh | 2 +- dev/export_images.sh | 2 +- dev/registry.sh | 2 +- docs/clients/install.md | 8 +-- docs/clients/python.md | 12 ++--- docs/clusters/advanced/self-hosted-images.md | 2 +- docs/clusters/management/create.md | 52 ++++++++++---------- docs/workloads/async/configuration.md | 6 +-- docs/workloads/async/models.md | 2 +- docs/workloads/batch/configuration.md | 6 +-- docs/workloads/batch/models.md | 2 +- docs/workloads/debugging.md | 4 +- docs/workloads/dependencies/images.md | 24 ++++----- docs/workloads/realtime/configuration.md | 6 +-- docs/workloads/realtime/models.md | 4 +- docs/workloads/task/configuration.md | 2 +- get-cli.sh | 2 +- manager/check_cortex_version.sh | 2 +- manager/debug.sh | 2 +- manager/install.sh | 4 +- manager/refresh.sh | 2 +- pkg/consts/consts.go | 4 +- python/client/cortex/client.py | 14 +++--- python/client/cortex/consts.py | 2 +- python/client/setup.py | 2 +- python/serve/init/bootloader.sh | 2 +- python/serve/setup.py | 2 +- test/e2e/setup.py | 2 +- 30 files changed, 90 insertions(+), 90 deletions(-) diff --git a/build/build-image.sh b/build/build-image.sh index e0cbd0ad14..7c6a40479e 100755 --- a/build/build-image.sh +++ b/build/build-image.sh @@ -19,7 +19,7 @@ set -euo pipefail ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. >/dev/null && pwd)" -CORTEX_VERSION=master +CORTEX_VERSION=0.35.0 image=$1 diff --git a/build/cli.sh b/build/cli.sh index 4473b6d9c4..dd419f8a44 100755 --- a/build/cli.sh +++ b/build/cli.sh @@ -19,7 +19,7 @@ set -euo pipefail ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. >/dev/null && pwd)" -CORTEX_VERSION=master +CORTEX_VERSION=0.35.0 arg1=${1:-""} upload="false" diff --git a/build/push-image.sh b/build/push-image.sh index 2b867a04f4..6375df571e 100755 --- a/build/push-image.sh +++ b/build/push-image.sh @@ -17,7 +17,7 @@ set -euo pipefail -CORTEX_VERSION=master +CORTEX_VERSION=0.35.0 host=$1 image=$2 diff --git a/dev/export_images.sh b/dev/export_images.sh index 8db4acc676..9e50c21553 100755 --- a/dev/export_images.sh +++ b/dev/export_images.sh @@ -20,7 +20,7 @@ set -euo pipefail ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. >/dev/null && pwd)" # CORTEX_VERSION -cortex_version=master +cortex_version=0.35.0 # user set variables ecr_region=$1 diff --git a/dev/registry.sh b/dev/registry.sh index eda792d95c..e0c61642c6 100755 --- a/dev/registry.sh +++ b/dev/registry.sh @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -CORTEX_VERSION=master +CORTEX_VERSION=0.35.0 set -eo pipefail diff --git a/docs/clients/install.md b/docs/clients/install.md index 53885eba68..c694fed0c3 100644 --- a/docs/clients/install.md +++ b/docs/clients/install.md @@ -9,10 +9,10 @@ pip install cortex ``` -To install or upgrade to a specific version (e.g. v0.34.0): +To install or upgrade to a specific version (e.g. v0.35.0): ```bash -pip install cortex==0.34.0 +pip install cortex==0.35.0 ``` To upgrade to the latest version: @@ -25,8 +25,8 @@ pip install --upgrade cortex ```bash -# For example to download CLI version 0.34.0 (Note the "v"): -bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/v0.34.0/get-cli.sh)" +# For example to download CLI version 0.35.0 (Note the "v"): +bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/v0.35.0/get-cli.sh)" ``` By default, the Cortex CLI is installed at `/usr/local/bin/cortex`. To install the executable elsewhere, export the `CORTEX_INSTALL_PATH` environment variable to your desired location before running the command above. diff --git a/docs/clients/python.md b/docs/clients/python.md index a12f1d4ba8..af9196ed49 100644 --- a/docs/clients/python.md +++ b/docs/clients/python.md @@ -93,7 +93,7 @@ Deploy API(s) from a project directory. **Arguments**: -- `api_spec` - A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/master/ for schema. +- `api_spec` - A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/0.35/ for schema. - `project_dir` - Path to a python project. - `force` - Override any in-progress api updates. - `wait` - Streams logs until the APIs are ready. @@ -115,7 +115,7 @@ Deploy a Realtime API. **Arguments**: -- `api_spec` - A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/master/workloads/realtime-apis/configuration for schema. +- `api_spec` - A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/0.35/workloads/realtime-apis/configuration for schema. - `handler` - A Cortex Handler class implementation. - `requirements` - A list of PyPI dependencies that will be installed before the handler class implementation is invoked. - `conda_packages` - A list of Conda dependencies that will be installed before the handler class implementation is invoked. @@ -139,7 +139,7 @@ Deploy an Async API. **Arguments**: -- `api_spec` - A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/master/workloads/async-apis/configuration for schema. +- `api_spec` - A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/0.35/workloads/async-apis/configuration for schema. - `handler` - A Cortex Handler class implementation. - `requirements` - A list of PyPI dependencies that will be installed before the handler class implementation is invoked. - `conda_packages` - A list of Conda dependencies that will be installed before the handler class implementation is invoked. @@ -162,7 +162,7 @@ Deploy a Batch API. **Arguments**: -- `api_spec` - A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/master/workloads/batch-apis/configuration for schema. +- `api_spec` - A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/0.35/workloads/batch-apis/configuration for schema. - `handler` - A Cortex Handler class implementation. - `requirements` - A list of PyPI dependencies that will be installed before the handler class implementation is invoked. - `conda_packages` - A list of Conda dependencies that will be installed before the handler class implementation is invoked. @@ -184,7 +184,7 @@ Deploy a Task API. **Arguments**: -- `api_spec` - A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/master/workloads/task-apis/configuration for schema. +- `api_spec` - A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/0.35/workloads/task-apis/configuration for schema. - `task` - A callable class implementation. - `requirements` - A list of PyPI dependencies that will be installed before the handler class implementation is invoked. - `conda_packages` - A list of Conda dependencies that will be installed before the handler class implementation is invoked. @@ -206,7 +206,7 @@ Deploy a Task API. **Arguments**: -- `api_spec` - A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/master/workloads/realtime-apis/traffic-splitter/configuration for schema. +- `api_spec` - A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/0.35/workloads/realtime-apis/traffic-splitter/configuration for schema. **Returns**: diff --git a/docs/clusters/advanced/self-hosted-images.md b/docs/clusters/advanced/self-hosted-images.md index 4b473ade06..74b581c840 100644 --- a/docs/clusters/advanced/self-hosted-images.md +++ b/docs/clusters/advanced/self-hosted-images.md @@ -19,7 +19,7 @@ Clone the Cortex repo using the release tag corresponding to your version (which ```bash -export CORTEX_VERSION=0.34.0 +export CORTEX_VERSION=0.35.0 git clone --depth 1 --branch v$CORTEX_VERSION https://github.com/cortexlabs/cortex.git ``` diff --git a/docs/clusters/management/create.md b/docs/clusters/management/create.md index 53a3bd6a18..3e45f8c2c5 100644 --- a/docs/clusters/management/create.md +++ b/docs/clusters/management/create.md @@ -96,30 +96,30 @@ The docker images used by the cluster can also be overridden. They can be config ```yaml -image_operator: quay.io/cortexlabs/operator:master -image_controller_manager: quay.io/cortexlabs/controller-manager:master -image_manager: quay.io/cortexlabs/manager:master -image_downloader: quay.io/cortexlabs/downloader:master -image_request_monitor: quay.io/cortexlabs/request-monitor:master -image_async_gateway: quay.io/cortexlabs/async-gateway:master -image_cluster_autoscaler: quay.io/cortexlabs/cluster-autoscaler:master -image_metrics_server: quay.io/cortexlabs/metrics-server:master -image_inferentia: quay.io/cortexlabs/inferentia:master -image_neuron_rtd: quay.io/cortexlabs/neuron-rtd:master -image_nvidia: quay.io/cortexlabs/nvidia:master -image_fluent_bit: quay.io/cortexlabs/fluent-bit:master -image_istio_proxy: quay.io/cortexlabs/istio-proxy:master -image_istio_pilot: quay.io/cortexlabs/istio-pilot:master -image_prometheus: quay.io/cortexlabs/prometheus:master -image_prometheus_config_reloader: quay.io/cortexlabs/prometheus-config-reloader:master -image_prometheus_operator: quay.io/cortexlabs/prometheus-operator:master -image_prometheus_statsd_exporter: quay.io/cortexlabs/prometheus-statsd-exporter:master -image_prometheus_dcgm_exporter: quay.io/cortexlabs/prometheus-dcgm-exporter:master -image_prometheus_kube_state_metrics: quay.io/cortexlabs/prometheus-kube-state-metrics:master -image_prometheus_node_exporter: quay.io/cortexlabs/prometheus-node-exporter:master -image_kube_rbac_proxy: quay.io/cortexlabs/kube-rbac-proxy:master -image_grafana: quay.io/cortexlabs/grafana:master -image_event_exporter: quay.io/cortexlabs/event-exporter:master -image_enqueuer: quay.io/cortexlabs/enqueuer:master -image_kubexit: quay.io/cortexlabs/kubexit:master +image_operator: quay.io/cortexlabs/operator:0.35.0 +image_controller_manager: quay.io/cortexlabs/controller-manager:0.35.0 +image_manager: quay.io/cortexlabs/manager:0.35.0 +image_downloader: quay.io/cortexlabs/downloader:0.35.0 +image_request_monitor: quay.io/cortexlabs/request-monitor:0.35.0 +image_async_gateway: quay.io/cortexlabs/async-gateway:0.35.0 +image_cluster_autoscaler: quay.io/cortexlabs/cluster-autoscaler:0.35.0 +image_metrics_server: quay.io/cortexlabs/metrics-server:0.35.0 +image_inferentia: quay.io/cortexlabs/inferentia:0.35.0 +image_neuron_rtd: quay.io/cortexlabs/neuron-rtd:0.35.0 +image_nvidia: quay.io/cortexlabs/nvidia:0.35.0 +image_fluent_bit: quay.io/cortexlabs/fluent-bit:0.35.0 +image_istio_proxy: quay.io/cortexlabs/istio-proxy:0.35.0 +image_istio_pilot: quay.io/cortexlabs/istio-pilot:0.35.0 +image_prometheus: quay.io/cortexlabs/prometheus:0.35.0 +image_prometheus_config_reloader: quay.io/cortexlabs/prometheus-config-reloader:0.35.0 +image_prometheus_operator: quay.io/cortexlabs/prometheus-operator:0.35.0 +image_prometheus_statsd_exporter: quay.io/cortexlabs/prometheus-statsd-exporter:0.35.0 +image_prometheus_dcgm_exporter: quay.io/cortexlabs/prometheus-dcgm-exporter:0.35.0 +image_prometheus_kube_state_metrics: quay.io/cortexlabs/prometheus-kube-state-metrics:0.35.0 +image_prometheus_node_exporter: quay.io/cortexlabs/prometheus-node-exporter:0.35.0 +image_kube_rbac_proxy: quay.io/cortexlabs/kube-rbac-proxy:0.35.0 +image_grafana: quay.io/cortexlabs/grafana:0.35.0 +image_event_exporter: quay.io/cortexlabs/event-exporter:0.35.0 +image_enqueuer: quay.io/cortexlabs/enqueuer:0.35.0 +image_kubexit: quay.io/cortexlabs/kubexit:0.35.0 ``` diff --git a/docs/workloads/async/configuration.md b/docs/workloads/async/configuration.md index 595f698a19..4ecbaa696d 100644 --- a/docs/workloads/async/configuration.md +++ b/docs/workloads/async/configuration.md @@ -26,7 +26,7 @@ handler: shell: # relative path to a shell script for system package installation (default: dependencies.sh) config: # arbitrary dictionary passed to the constructor of the Handler class (optional) python_path: # path to the root of your Python folder that will be appended to PYTHONPATH (default: folder containing cortex.yaml) - image: # docker image to use for the handler (default: quay.io/cortexlabs/python-handler-cpu:master, quay.io/cortexlabs/python-handler-gpu:master-cuda10.2-cudnn8, or quay.io/cortexlabs/python-handler-inf:master based on compute) + image: # docker image to use for the handler (default: quay.io/cortexlabs/python-handler-cpu:0.35.0, quay.io/cortexlabs/python-handler-gpu:0.35.0-cuda10.2-cudnn8, or quay.io/cortexlabs/python-handler-inf:0.35.0 based on compute) env: # dictionary of environment variables log_level: # log level that can be "debug", "info", "warning" or "error" (default: "info") shm_size: # size of shared memory (/dev/shm) for sharing data between multiple processes, e.g. 64Mi or 1Gi (default: Null) @@ -55,8 +55,8 @@ handler: signature_key: # name of the signature def to use for prediction (required if your model has more than one signature def) config: # arbitrary dictionary passed to the constructor of the Handler class (optional) python_path: # path to the root of your Python folder that will be appended to PYTHONPATH (default: folder containing cortex.yaml) - image: # docker image to use for the handler (default: quay.io/cortexlabs/tensorflow-handler:master) - tensorflow_serving_image: # docker image to use for the TensorFlow Serving container (default: quay.io/cortexlabs/tensorflow-serving-cpu:master, quay.io/cortexlabs/tensorflow-serving-gpu:master, or quay.io/cortexlabs/tensorflow-serving-inf:master based on compute) + image: # docker image to use for the handler (default: quay.io/cortexlabs/tensorflow-handler:0.35.0) + tensorflow_serving_image: # docker image to use for the TensorFlow Serving container (default: quay.io/cortexlabs/tensorflow-serving-cpu:0.35.0, quay.io/cortexlabs/tensorflow-serving-gpu:0.35.0, or quay.io/cortexlabs/tensorflow-serving-inf:0.35.0 based on compute) env: # dictionary of environment variables log_level: # log level that can be "debug", "info", "warning" or "error" (default: "info") shm_size: # size of shared memory (/dev/shm) for sharing data between multiple processes, e.g. 64Mi or 1Gi (default: Null) diff --git a/docs/workloads/async/models.md b/docs/workloads/async/models.md index 6f1c4efff5..9a77123c89 100644 --- a/docs/workloads/async/models.md +++ b/docs/workloads/async/models.md @@ -44,7 +44,7 @@ class Handler: Cortex provides a `tensorflow_client` to your handler's constructor. `tensorflow_client` is an instance -of [TensorFlowClient](https://github.com/cortexlabs/cortex/tree/master/python/serve/cortex_internal/lib/client/tensorflow.py) +of [TensorFlowClient](https://github.com/cortexlabs/cortex/tree/0.35/python/serve/cortex_internal/lib/client/tensorflow.py) that manages a connection to a TensorFlow Serving container to make predictions using your model. It should be saved as an instance variable in your handler class, and your `handle_async()` function should call `tensorflow_client.predict()` to make an inference with your exported TensorFlow model. Preprocessing of the JSON payload and postprocessing of predictions diff --git a/docs/workloads/batch/configuration.md b/docs/workloads/batch/configuration.md index f7b6ecc9c4..c8906df2a0 100644 --- a/docs/workloads/batch/configuration.md +++ b/docs/workloads/batch/configuration.md @@ -19,7 +19,7 @@ handler: path: # path to a python file with a Handler class definition, relative to the Cortex root (required) config: # arbitrary dictionary passed to the constructor of the Handler class (can be overridden by config passed in job submission) (optional) python_path: # path to the root of your Python folder that will be appended to PYTHONPATH (default: folder containing cortex.yaml) - image: # docker image to use for the handler (default: quay.io/cortexlabs/python-handler-cpu:master or quay.io/cortexlabs/python-handler-gpu:master-cuda10.2-cudnn8 based on compute) + image: # docker image to use for the handler (default: quay.io/cortexlabs/python-handler-cpu:0.35.0 or quay.io/cortexlabs/python-handler-gpu:0.35.0-cuda10.2-cudnn8 based on compute) env: # dictionary of environment variables log_level: # log level that can be "debug", "info", "warning" or "error" (default: "info") shm_size: # size of shared memory (/dev/shm) for sharing data between multiple processes, e.g. 64Mi or 1Gi (default: Null) @@ -49,8 +49,8 @@ handler: batch_interval: # the maximum amount of time to spend waiting for additional requests before running inference on the batch of requests config: # arbitrary dictionary passed to the constructor of the Handler class (can be overridden by config passed in job submission) (optional) python_path: # path to the root of your Python folder that will be appended to PYTHONPATH (default: folder containing cortex.yaml) - image: # docker image to use for the handler (default: quay.io/cortexlabs/tensorflow-handler:master) - tensorflow_serving_image: # docker image to use for the TensorFlow Serving container (default: quay.io/cortexlabs/tensorflow-serving-cpu:master or quay.io/cortexlabs/tensorflow-serving-gpu:master based on compute) + image: # docker image to use for the handler (default: quay.io/cortexlabs/tensorflow-handler:0.35.0) + tensorflow_serving_image: # docker image to use for the TensorFlow Serving container (default: quay.io/cortexlabs/tensorflow-serving-cpu:0.35.0 or quay.io/cortexlabs/tensorflow-serving-gpu:0.35.0 based on compute) env: # dictionary of environment variables log_level: # log level that can be "debug", "info", "warning" or "error" (default: "info") shm_size: # size of shared memory (/dev/shm) for sharing data between multiple processes, e.g. 64Mi or 1Gi (default: Null) diff --git a/docs/workloads/batch/models.md b/docs/workloads/batch/models.md index 9f248482ed..a5c1f67912 100644 --- a/docs/workloads/batch/models.md +++ b/docs/workloads/batch/models.md @@ -55,7 +55,7 @@ class Handler: ``` -Cortex provides a `tensorflow_client` to your Handler class' constructor. `tensorflow_client` is an instance of [TensorFlowClient](https://github.com/cortexlabs/cortex/tree/master/python/serve/cortex_internal/lib/client/tensorflow.py) that manages a connection to a TensorFlow Serving container to make predictions using your model. It should be saved as an instance variable in your Handler class, and your `handle_batch()` function should call `tensorflow_client.predict()` to make an inference with your exported TensorFlow model. Preprocessing of the JSON payload and postprocessing of predictions can be implemented in your `handle_batch()` function as well. +Cortex provides a `tensorflow_client` to your Handler class' constructor. `tensorflow_client` is an instance of [TensorFlowClient](https://github.com/cortexlabs/cortex/tree/0.35/python/serve/cortex_internal/lib/client/tensorflow.py) that manages a connection to a TensorFlow Serving container to make predictions using your model. It should be saved as an instance variable in your Handler class, and your `handle_batch()` function should call `tensorflow_client.predict()` to make an inference with your exported TensorFlow model. Preprocessing of the JSON payload and postprocessing of predictions can be implemented in your `handle_batch()` function as well. When multiple models are defined using the Handler's `models` field, the `tensorflow_client.predict()` method expects a second argument `model_name` which must hold the name of the model that you want to use for inference (for example: `self.client.predict(payload, "text-generator")`). There is also an optional third argument to specify the model version. diff --git a/docs/workloads/debugging.md b/docs/workloads/debugging.md index d7f85a28b5..b03af8f971 100644 --- a/docs/workloads/debugging.md +++ b/docs/workloads/debugging.md @@ -12,10 +12,10 @@ For example: cortex prepare-debug cortex.yaml iris-classifier > docker run -p 9000:8888 \ -> -e "CORTEX_VERSION=0.34.0" \ +> -e "CORTEX_VERSION=0.35.0" \ > -e "CORTEX_API_SPEC=/mnt/project/iris-classifier.debug.json" \ > -v /home/ubuntu/iris-classifier:/mnt/project \ -> quay.io/cortexlabs/python-handler-cpu:0.34.0 +> quay.io/cortexlabs/python-handler-cpu:0.35.0 ``` Make a request to the api container: diff --git a/docs/workloads/dependencies/images.md b/docs/workloads/dependencies/images.md index fc9792e857..0d4cfc1584 100644 --- a/docs/workloads/dependencies/images.md +++ b/docs/workloads/dependencies/images.md @@ -11,17 +11,17 @@ mkdir my-api && cd my-api && touch Dockerfile Cortex's base Docker images are listed below. Depending on the Cortex Handler and compute type specified in your API configuration, choose one of these images to use as the base for your Docker image: -* Python Handler (CPU): `quay.io/cortexlabs/python-handler-cpu:master` +* Python Handler (CPU): `quay.io/cortexlabs/python-handler-cpu:0.35.0` * Python Handler (GPU): choose one of the following: - * `quay.io/cortexlabs/python-handler-gpu:master-cuda10.0-cudnn7` - * `quay.io/cortexlabs/python-handler-gpu:master-cuda10.1-cudnn7` - * `quay.io/cortexlabs/python-handler-gpu:master-cuda10.1-cudnn8` - * `quay.io/cortexlabs/python-handler-gpu:master-cuda10.2-cudnn7` - * `quay.io/cortexlabs/python-handler-gpu:master-cuda10.2-cudnn8` - * `quay.io/cortexlabs/python-handler-gpu:master-cuda11.0-cudnn8` - * `quay.io/cortexlabs/python-handler-gpu:master-cuda11.1-cudnn8` -* Python Handler (Inferentia): `quay.io/cortexlabs/python-handler-inf:master` -* TensorFlow Handler (CPU, GPU, Inferentia): `quay.io/cortexlabs/tensorflow-handler:master` + * `quay.io/cortexlabs/python-handler-gpu:0.35.0-cuda10.0-cudnn7` + * `quay.io/cortexlabs/python-handler-gpu:0.35.0-cuda10.1-cudnn7` + * `quay.io/cortexlabs/python-handler-gpu:0.35.0-cuda10.1-cudnn8` + * `quay.io/cortexlabs/python-handler-gpu:0.35.0-cuda10.2-cudnn7` + * `quay.io/cortexlabs/python-handler-gpu:0.35.0-cuda10.2-cudnn8` + * `quay.io/cortexlabs/python-handler-gpu:0.35.0-cuda11.0-cudnn8` + * `quay.io/cortexlabs/python-handler-gpu:0.35.0-cuda11.1-cudnn8` +* Python Handler (Inferentia): `quay.io/cortexlabs/python-handler-inf:0.35.0` +* TensorFlow Handler (CPU, GPU, Inferentia): `quay.io/cortexlabs/tensorflow-handler:0.35.0` The sample `Dockerfile` below inherits from Cortex's Python CPU serving image, and installs 3 packages. `tree` is a system package and `pandas` and `rdkit` are Python packages. @@ -29,7 +29,7 @@ The sample `Dockerfile` below inherits from Cortex's Python CPU serving image, a ```dockerfile # Dockerfile -FROM quay.io/cortexlabs/python-handler-cpu:master +FROM quay.io/cortexlabs/python-handler-cpu:0.35.0 RUN apt-get update \ && apt-get install -y tree \ @@ -47,7 +47,7 @@ If you need to upgrade the Python Runtime version on your image, you can follow ```Dockerfile # Dockerfile -FROM quay.io/cortexlabs/python-handler-cpu:master +FROM quay.io/cortexlabs/python-handler-cpu:0.35.0 # upgrade python runtime version RUN conda update -n base -c defaults conda diff --git a/docs/workloads/realtime/configuration.md b/docs/workloads/realtime/configuration.md index 81f8e2a63f..6be0434410 100644 --- a/docs/workloads/realtime/configuration.md +++ b/docs/workloads/realtime/configuration.md @@ -40,7 +40,7 @@ handler: threads_per_process: # the number of threads per process (default: 1) config: # arbitrary dictionary passed to the constructor of the Handler class (optional) python_path: # path to the root of your Python folder that will be appended to PYTHONPATH (default: folder containing cortex.yaml) - image: # docker image to use for the Handler class (default: quay.io/cortexlabs/python-handler-cpu:master, quay.io/cortexlabs/python-handler-gpu:master-cuda10.2-cudnn8, or quay.io/cortexlabs/python-handler-inf:master based on compute) + image: # docker image to use for the Handler class (default: quay.io/cortexlabs/python-handler-cpu:0.35.0, quay.io/cortexlabs/python-handler-gpu:0.35.0-cuda10.2-cudnn8, or quay.io/cortexlabs/python-handler-inf:0.35.0 based on compute) env: # dictionary of environment variables log_level: # log level that can be "debug", "info", "warning" or "error" (default: "info") shm_size: # size of shared memory (/dev/shm) for sharing data between multiple processes, e.g. 64Mi or 1Gi (default: Null) @@ -76,8 +76,8 @@ handler: threads_per_process: # the number of threads per process (default: 1) config: # arbitrary dictionary passed to the constructor of the Handler class (optional) python_path: # path to the root of your Python folder that will be appended to PYTHONPATH (default: folder containing cortex.yaml) - image: # docker image to use for the handler (default: quay.io/cortexlabs/tensorflow-handler:master) - tensorflow_serving_image: # docker image to use for the TensorFlow Serving container (default: quay.io/cortexlabs/tensorflow-serving-cpu:master, quay.io/cortexlabs/tensorflow-serving-gpu:master, or quay.io/cortexlabs/tensorflow-serving-inf:master based on compute) + image: # docker image to use for the handler (default: quay.io/cortexlabs/tensorflow-handler:0.35.0) + tensorflow_serving_image: # docker image to use for the TensorFlow Serving container (default: quay.io/cortexlabs/tensorflow-serving-cpu:0.35.0, quay.io/cortexlabs/tensorflow-serving-gpu:0.35.0, or quay.io/cortexlabs/tensorflow-serving-inf:0.35.0 based on compute) env: # dictionary of environment variables log_level: # log level that can be "debug", "info", "warning" or "error" (default: "info") shm_size: # size of shared memory (/dev/shm) for sharing data between multiple processes, e.g. 64Mi or 1Gi (default: Null) diff --git a/docs/workloads/realtime/models.md b/docs/workloads/realtime/models.md index 6f8685fa80..97907d80fc 100644 --- a/docs/workloads/realtime/models.md +++ b/docs/workloads/realtime/models.md @@ -95,7 +95,7 @@ class Handler: ``` -When explicit model paths are specified in the Python handler's API configuration, Cortex provides a `model_client` to your Handler's constructor. `model_client` is an instance of [ModelClient](https://github.com/cortexlabs/cortex/tree/master/python/serve/cortex_internal/lib/client/python.py) that is used to load model(s) (it calls the `load_model()` method of your handler, which must be defined when using explicit model paths). It should be saved as an instance variable in your handler class, and your handler method should call `model_client.get_model()` to load your model for inference. Preprocessing of the JSON/gRPC payload and postprocessing of predictions can be implemented in your handler method as well. +When explicit model paths are specified in the Python handler's API configuration, Cortex provides a `model_client` to your Handler's constructor. `model_client` is an instance of [ModelClient](https://github.com/cortexlabs/cortex/tree/0.35/python/serve/cortex_internal/lib/client/python.py) that is used to load model(s) (it calls the `load_model()` method of your handler, which must be defined when using explicit model paths). It should be saved as an instance variable in your handler class, and your handler method should call `model_client.get_model()` to load your model for inference. Preprocessing of the JSON/gRPC payload and postprocessing of predictions can be implemented in your handler method as well. When multiple models are defined using the Handler's `multi_model_reloading` field, the `model_client.get_model()` method expects an argument `model_name` which must hold the name of the model that you want to load (for example: `self.client.get_model("text-generator")`). There is also an optional second argument to specify the model version. @@ -284,7 +284,7 @@ class Handler: ``` -Cortex provides a `tensorflow_client` to your Handler's constructor. `tensorflow_client` is an instance of [TensorFlowClient](https://github.com/cortexlabs/cortex/tree/master/python/serve/cortex_internal/lib/client/tensorflow.py) that manages a connection to a TensorFlow Serving container to make predictions using your model. It should be saved as an instance variable in your Handler class, and your handler method should call `tensorflow_client.predict()` to make an inference with your exported TensorFlow model. Preprocessing of the JSON payload and postprocessing of predictions can be implemented in your handler method as well. +Cortex provides a `tensorflow_client` to your Handler's constructor. `tensorflow_client` is an instance of [TensorFlowClient](https://github.com/cortexlabs/cortex/tree/0.35/python/serve/cortex_internal/lib/client/tensorflow.py) that manages a connection to a TensorFlow Serving container to make predictions using your model. It should be saved as an instance variable in your Handler class, and your handler method should call `tensorflow_client.predict()` to make an inference with your exported TensorFlow model. Preprocessing of the JSON payload and postprocessing of predictions can be implemented in your handler method as well. When multiple models are defined using the Handler's `models` field, the `tensorflow_client.predict()` method expects a second argument `model_name` which must hold the name of the model that you want to use for inference (for example: `self.client.predict(payload, "text-generator")`). There is also an optional third argument to specify the model version. diff --git a/docs/workloads/task/configuration.md b/docs/workloads/task/configuration.md index 84c31312c6..ecde6aaf7a 100644 --- a/docs/workloads/task/configuration.md +++ b/docs/workloads/task/configuration.md @@ -13,7 +13,7 @@ shell: # relative path to a shell script for system package installation (default: dependencies.sh) python_path: # path to the root of your Python folder that will be appended to PYTHONPATH (default: folder containing cortex.yaml) shm_size: # size of shared memory (/dev/shm) for sharing data between multiple processes, e.g. 64Mi or 1Gi (default: Null) - image: # docker image to use for the Task (default: quay.io/cortexlabs/python-handler-cpu:master, quay.io/cortexlabs/python-handler-gpu:master-cuda10.2-cudnn8, or quay.io/cortexlabs/python-handler-inf:master based on compute) + image: # docker image to use for the Task (default: quay.io/cortexlabs/python-handler-cpu:0.35.0, quay.io/cortexlabs/python-handler-gpu:0.35.0-cuda10.2-cudnn8, or quay.io/cortexlabs/python-handler-inf:0.35.0 based on compute) env: # dictionary of environment variables log_level: # log level that can be "debug", "info", "warning" or "error" (default: "info") networking: diff --git a/get-cli.sh b/get-cli.sh index e9be9627fa..ee3551e9b4 100755 --- a/get-cli.sh +++ b/get-cli.sh @@ -16,7 +16,7 @@ set -e -CORTEX_VERSION_BRANCH_STABLE=master +CORTEX_VERSION_BRANCH_STABLE=0.35.0 CORTEX_INSTALL_PATH="${CORTEX_INSTALL_PATH:-/usr/local/bin/cortex}" # replace ~ with the home directory path diff --git a/manager/check_cortex_version.sh b/manager/check_cortex_version.sh index 690491f16f..ea0d7ee21d 100755 --- a/manager/check_cortex_version.sh +++ b/manager/check_cortex_version.sh @@ -16,7 +16,7 @@ set -e -CORTEX_VERSION=master +CORTEX_VERSION=0.35.0 if [ "$CORTEX_VERSION" != "$CORTEX_CLI_VERSION" ]; then echo "error: your CLI version ($CORTEX_CLI_VERSION) doesn't match your Cortex manager image version ($CORTEX_VERSION); please update your CLI (pip install cortex==$CORTEX_VERSION) to match the version of your Cortex manager image" diff --git a/manager/debug.sh b/manager/debug.sh index a17d404535..883c9279ad 100755 --- a/manager/debug.sh +++ b/manager/debug.sh @@ -16,7 +16,7 @@ set +e -CORTEX_VERSION_MINOR=master +CORTEX_VERSION_MINOR=0.35 debug_out_path="$1" mkdir -p "$(dirname "$debug_out_path")" diff --git a/manager/install.sh b/manager/install.sh index 614796ad0b..723668da3a 100755 --- a/manager/install.sh +++ b/manager/install.sh @@ -16,8 +16,8 @@ set -eo pipefail -export CORTEX_VERSION=master -export CORTEX_VERSION_MINOR=master +export CORTEX_VERSION=0.35.0 +export CORTEX_VERSION_MINOR=0.35 EKSCTL_TIMEOUT=45m mkdir /workspace diff --git a/manager/refresh.sh b/manager/refresh.sh index 126591d65e..7e9b86e919 100755 --- a/manager/refresh.sh +++ b/manager/refresh.sh @@ -16,7 +16,7 @@ set -e -CORTEX_VERSION_MINOR=master +CORTEX_VERSION_MINOR=0.35 cluster_config_out_path="$1" mkdir -p "$(dirname "$cluster_config_out_path")" diff --git a/pkg/consts/consts.go b/pkg/consts/consts.go index 8636517447..02c16823f2 100644 --- a/pkg/consts/consts.go +++ b/pkg/consts/consts.go @@ -24,8 +24,8 @@ import ( ) var ( - CortexVersion = "master" // CORTEX_VERSION - CortexVersionMinor = "master" // CORTEX_VERSION_MINOR + CortexVersion = "0.35.0" // CORTEX_VERSION + CortexVersionMinor = "0.35" // CORTEX_VERSION_MINOR SingleModelName = "_cortex_default" diff --git a/python/client/cortex/client.py b/python/client/cortex/client.py index 22e5bcf333..352a5d954e 100644 --- a/python/client/cortex/client.py +++ b/python/client/cortex/client.py @@ -59,7 +59,7 @@ def deploy( Deploy API(s) from a project directory. Args: - api_spec: A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/master/ for schema. + api_spec: A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/0.35/ for schema. project_dir: Path to a python project. force: Override any in-progress api updates. wait: Streams logs until the APIs are ready. @@ -88,7 +88,7 @@ def deploy_realtime_api( Deploy a Realtime API. Args: - api_spec: A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/master/workloads/realtime-apis/configuration for schema. + api_spec: A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/0.35/workloads/realtime-apis/configuration for schema. handler: A Cortex Handler class implementation. requirements: A list of PyPI dependencies that will be installed before the handler class implementation is invoked. conda_packages: A list of Conda dependencies that will be installed before the handler class implementation is invoked. @@ -126,7 +126,7 @@ def deploy_async_api( Deploy an Async API. Args: - api_spec: A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/master/workloads/async-apis/configuration for schema. + api_spec: A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/0.35/workloads/async-apis/configuration for schema. handler: A Cortex Handler class implementation. requirements: A list of PyPI dependencies that will be installed before the handler class implementation is invoked. conda_packages: A list of Conda dependencies that will be installed before the handler class implementation is invoked. @@ -161,7 +161,7 @@ def deploy_batch_api( Deploy a Batch API. Args: - api_spec: A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/master/workloads/batch-apis/configuration for schema. + api_spec: A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/0.35/workloads/batch-apis/configuration for schema. handler: A Cortex Handler class implementation. requirements: A list of PyPI dependencies that will be installed before the handler class implementation is invoked. conda_packages: A list of Conda dependencies that will be installed before the handler class implementation is invoked. @@ -195,7 +195,7 @@ def deploy_task_api( Deploy a Task API. Args: - api_spec: A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/master/workloads/task-apis/configuration for schema. + api_spec: A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/0.35/workloads/task-apis/configuration for schema. task: A callable class implementation. requirements: A list of PyPI dependencies that will be installed before the handler class implementation is invoked. conda_packages: A list of Conda dependencies that will be installed before the handler class implementation is invoked. @@ -225,7 +225,7 @@ def deploy_traffic_splitter( Deploy a Task API. Args: - api_spec: A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/master/workloads/realtime-apis/traffic-splitter/configuration for schema. + api_spec: A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/0.35/workloads/realtime-apis/traffic-splitter/configuration for schema. Returns: Deployment status, API specification, and endpoint for each API. @@ -257,7 +257,7 @@ def _create_api( Deploy an API. Args: - api_spec: A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/master/ for schema. + api_spec: A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/0.35/ for schema. handler: A Cortex Handler class implementation. Not required for TaskAPI/TrafficSplitter kinds. task: A callable class/function implementation. Not required for RealtimeAPI/BatchAPI/TrafficSplitter kinds. requirements: A list of PyPI dependencies that will be installed before the handler class implementation is invoked. diff --git a/python/client/cortex/consts.py b/python/client/cortex/consts.py index 316ec3f5b3..0fbe021dd1 100644 --- a/python/client/cortex/consts.py +++ b/python/client/cortex/consts.py @@ -15,6 +15,6 @@ # Change if PYTHONVERSION changes EXPECTED_PYTHON_VERSION = "3.6.9" -CORTEX_VERSION = "master" # CORTEX_VERSION +CORTEX_VERSION = "0.35.0" # CORTEX_VERSION CORTEX_TELEMETRY_SENTRY_DSN = "https://5cea3d2d67194d028f7191fcc6ebca14@sentry.io/1825326" CORTEX_TELEMETRY_SENTRY_ENVIRONMENT = "client" diff --git a/python/client/setup.py b/python/client/setup.py index 4d5bd754bd..98ca9621bb 100644 --- a/python/client/setup.py +++ b/python/client/setup.py @@ -79,7 +79,7 @@ def run(self): setup( name="cortex", - version="master", # CORTEX_VERSION + version="0.35.0", # CORTEX_VERSION description="Scale compute-intensive serverless workloads", author="cortex.dev", author_email="dev@cortex.dev", diff --git a/python/serve/init/bootloader.sh b/python/serve/init/bootloader.sh index a391333290..94d63ff6e9 100755 --- a/python/serve/init/bootloader.sh +++ b/python/serve/init/bootloader.sh @@ -17,7 +17,7 @@ set -e # CORTEX_VERSION -export EXPECTED_CORTEX_VERSION=master +export EXPECTED_CORTEX_VERSION=0.35.0 if [ "$CORTEX_VERSION" != "$EXPECTED_CORTEX_VERSION" ]; then echo "error: your Cortex operator version ($CORTEX_VERSION) doesn't match your handler image version ($EXPECTED_CORTEX_VERSION); please update your handler image by modifying the \`image\` field in your API configuration file (e.g. cortex.yaml) and re-running \`cortex deploy\`, or update your cluster by following the instructions at https://docs.cortex.dev/" diff --git a/python/serve/setup.py b/python/serve/setup.py index e804a98740..c74ea4b2f5 100644 --- a/python/serve/setup.py +++ b/python/serve/setup.py @@ -24,7 +24,7 @@ setup( name="cortex-internal", - version="master", # CORTEX_VERSION + version="0.35.0", # CORTEX_VERSION description="Internal package for Cortex containers", author="cortex.dev", author_email="dev@cortex.dev", diff --git a/test/e2e/setup.py b/test/e2e/setup.py index 34eca3f822..1a7d9ec2e0 100644 --- a/test/e2e/setup.py +++ b/test/e2e/setup.py @@ -24,7 +24,7 @@ setup( name="e2e", - version="master", # CORTEX_VERSION + version="0.35.0", # CORTEX_VERSION packages=find_packages(exclude=["tests"]), url="https://github.com/cortexlabs/cortex", license="Apache License 2.0",