Get started: InstallTutorialDocsExamples

Learn more: WebsiteBlogSubscribeContact

Cortex is a machine learning deployment platform that runs in your AWS account. It takes exported models from S3 and deploys them as web APIs. It also handles autoscaling, rolling updates, log streaming, inference on CPUs or GPUs, and more.

Cortex is maintained by a venture-backed team of infrastructure engineers and we're hiring.

How it works

Define your deployment using declarative configuration:

# cortex.yaml
- kind: api
name: my-api
model: s3://my-bucket/

Customize request handling (optional):

# Load data for preprocessing or postprocessing. For example:
labels = download_my_labels_from_s3()
def pre_inference(sample, metadata):
# Python code
def post_inference(prediction, metadata):
# Python code

Deploy to AWS:

$ cortex deploy
Deploying ...
https://*** # Your API is ready!

Serve real time predictions via scalable JSON APIs:

$ curl -d '{"a": 1, "b": 2, "c": 3}' https://***
{ prediction: "def" }

Hosting Cortex on AWS

# Download the install script
$ curl -O && chmod +x
# Set your AWS credentials
$ export AWS_ACCESS_KEY_ID=***
# Provision infrastructure on AWS and install Cortex
$ ./ install
# Install the Cortex CLI on your machine
$ ./ install cli

Key features

  • Minimal declarative configuration: Deployments can be defined in a single cortex.yaml file.

  • Autoscaling: Cortex can automatically scale APIs to handle production workloads.

  • Multi framework: Cortex supports TensorFlow, Keras, PyTorch, Scikit-learn, XGBoost, and more.

  • Rolling updates: Cortex updates deployed APIs without any downtime.

  • Log streaming: Cortex streams logs from your deployed models to your CLI.

  • CPU / GPU support: Cortex can run inference on CPU or GPU infrastructure.