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