Install

Spin up Cortex on your GCP account

Make sure Docker is running on your machine.

If you're using GPUs, make sure your GPU quota is sufficient (see here).

# install the CLI
pip install cortex
# spin up Cortex on your GCP account
cortex cluster-gcp up # or: cortex cluster-gcp up --config cluster.yaml (see configuration options below)

Configure Cortex

# cluster.yaml
# GKE cluster name
cluster_name: cortex
# GCP project ID
project: <your GCP project ID>
# GCP zone for your cluster
zone: us-central1-a
# instance type
instance_type: n1-standard-2
# minimum number of instances
min_instances: 1
# maximum number of instances
max_instances: 5
# GPU to attach to your instance (optional)
# accelerator_type: nvidia-tesla-t4
# the name of the network in which to create your cluster
# network: default
# the name of the subnetwork in which to create your cluster
# subnet: default

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):

image_operator: quay.io/cortexlabs/operator:0.26.0
image_manager: quay.io/cortexlabs/manager:0.26.0
image_downloader: quay.io/cortexlabs/downloader:0.26.0
image_statsd: quay.io/cortexlabs/statsd:0.26.0
image_istio_proxy: quay.io/cortexlabs/istio-proxy:0.26.0
image_istio_pilot: quay.io/cortexlabs/istio-pilot:0.26.0
image_pause: quay.io/cortexlabs/pause:0.26.0