|
| 1 | +# Install |
| 2 | + |
| 3 | +_WARNING: you are on the master branch, please refer to the docs on the branch that matches your `cortex version`_ |
| 4 | + |
| 5 | +## Spin up Cortex on your GCP account |
| 6 | + |
| 7 | +Make sure [Docker](https://docs.docker.com/install) is running on your machine. |
| 8 | + |
| 9 | +If you're using GPUs, make sure your GPU quota is sufficient (see [here](https://cloud.google.com/compute/quotas)). |
| 10 | + |
| 11 | +```bash |
| 12 | +# install the CLI |
| 13 | +pip install cortex |
| 14 | + |
| 15 | +# spin up Cortex on your GCP account |
| 16 | +cortex cluster-gcp up # or: cortex cluster-gcp up --config cluster.yaml (see configuration options below) |
| 17 | + |
| 18 | +# set the default environment |
| 19 | +cortex env default gcp |
| 20 | +``` |
| 21 | + |
| 22 | +<!-- CORTEX_VERSION_MINOR --> |
| 23 | +Try the [tutorial](../../examples/pytorch/text-generator/README.md). |
| 24 | + |
| 25 | +## Configure Cortex |
| 26 | + |
| 27 | +<!-- CORTEX_VERSION_MINOR --> |
| 28 | +```yaml |
| 29 | +# cluster.yaml |
| 30 | + |
| 31 | +# GKE cluster name |
| 32 | +cluster_name: cortex |
| 33 | + |
| 34 | +# GCP project ID |
| 35 | +project: <your GCP project ID> |
| 36 | + |
| 37 | +# GCP zone for your cluster |
| 38 | +zone: us-central1-a |
| 39 | + |
| 40 | +# instance type |
| 41 | +instance_type: n1-standard-2 |
| 42 | + |
| 43 | +# GPU to attach to your instance (optional) |
| 44 | +accelerator_type: nvidia-tesla-t4 |
| 45 | + |
| 46 | +# minimum number of instances |
| 47 | +min_instances: 1 |
| 48 | + |
| 49 | +# maximum number of instances |
| 50 | +max_instances: 5 |
| 51 | +``` |
| 52 | +
|
| 53 | +The docker images used by the Cortex cluster can also be overridden, although this is not common. They can be configured by adding any of these keys to your cluster configuration file (default values are shown): |
| 54 | +
|
| 55 | +<!-- CORTEX_VERSION_BRANCH_STABLE --> |
| 56 | +```yaml |
| 57 | +image_operator: quay.io/cortexlabs/operator:master |
| 58 | +image_manager: quay.io/cortexlabs/manager:master |
| 59 | +image_downloader: quay.io/cortexlabs/downloader:master |
| 60 | +image_statsd: quay.io/cortexlabs/statsd:master |
| 61 | +image_istio_proxy: quay.io/cortexlabs/istio-proxy:master |
| 62 | +image_istio_pilot: quay.io/cortexlabs/istio-pilot:master |
| 63 | +image_pause: quay.io/cortexlabs/pause:master |
| 64 | +``` |
| 65 | +
|
| 66 | +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). |
0 commit comments