Install

Prerequisites

  1. Docker

Installing Cortex in your AWS account

# Download
curl -O https://raw.githubusercontent.com/cortexlabs/cortex/0.7/cortex.sh
# Change permissions
chmod +x cortex.sh
# Set AWS credentials
export AWS_ACCESS_KEY_ID=***
export AWS_SECRET_ACCESS_KEY=***
# Provision infrastructure on AWS and install Cortex
./cortex.sh install

See cluster configuration to customize your installation.

Installing and configuring the CLI

# Install the Cortex CLI on your machine
./cortex.sh install cli
# Get the operator endpoint
./cortex.sh info
# Configure the CLI
cortex configure

Creating a deployment

# Clone the Cortex repository
git clone -b 0.7 https://github.com/cortexlabs/cortex.git
# Navigate to the iris classification example
cd cortex/examples/iris
# Deploy the model to the cluster
cortex deploy
# View the status of the deployment
cortex get --watch
# Get the API's endpoint
cortex get tensorflow
# Classify a sample
curl -k -X POST -H "Content-Type: application/json" \
-d '{ "samples": [ { "sepal_length": 5.2, "sepal_width": 3.6, "petal_length": 1.4, "petal_width": 0.3 } ] }' \
<API endpoint>

Cleanup

# Delete the deployment
cortex delete iris

See uninstall if you'd like to uninstall Cortex.