Install

AWS account and access key

As of now, Cortex only runs on AWS. We plan to support other cloud providers in the future. If you don't have an AWS account you can get started with one here.

Follow this tutorial to create an access key.

Note

  • Enable programmatic access for the IAM user.

  • Attach the existing policy AdministratorAccess to your IAM user, or see security for a minimal access configuration.

  • Each of the steps below requires different permissions. Please ensure you have the required permissions for each of the steps you need to run. The AdministratorAccess policy will work for all steps.

Install script

# Download
curl -O https://raw.githubusercontent.com/cortexlabs/cortex/0.3/cortex-installer.sh
# Change permissions
chmod +x cortex-installer.sh
# Set AWS credentials
export AWS_ACCESS_KEY_ID=***
export AWS_SECRET_ACCESS_KEY=***

Kubernetes

Cortex runs on Kubernetes. If you don't already have a Kubernetes cluster, eksctl is a simple tool to create and manage one.

We recommend a minimum cluster size of 2 t3.medium AWS instances. Cortex may not run successfully on clusters with less compute resources.

# Install kubectl, eksctl, and aws-iam-authenticator
./cortex-installer.sh install kubernetes-tools
# Spin up an EKS cluster (this takes ~20 minutes; see eksctl.io for more options)
eksctl create cluster --name=cortex --nodes=2 --node-type=t3.medium

This cluster configuration will cost about $0.29 per hour in AWS fees.

Operator

The Cortex operator is a service that runs on Kubernetes, translates declarative configuration into workloads, and orchestrates those workloads on the cluster. Its installation is configurable. For a full list of configuration options please refer to the operator config documentation.

# Install the Cortex operator
./cortex-installer.sh install operator

CLI

The CLI runs on developer machines (e.g. your laptop) and communicates with the operator.

# Install the Cortex CLI
./cortex-installer.sh install cli
# Get the operator endpoint
./cortex-installer.sh get endpoints
# Configure the CLI
cortex configure