​AWS credentials​
​Docker​
See cluster configuration to customize your installation.
# Downloadcurl -O https://raw.githubusercontent.com/cortexlabs/cortex/0.8/cortex.sh​# Change permissionschmod +x cortex.sh​# Install the Cortex CLI on your machine./cortex.sh install cli​# Set AWS credentialsexport AWS_ACCESS_KEY_ID=***export AWS_SECRET_ACCESS_KEY=***​# Configure AWS instance settings (at least 4GB memory)export CORTEX_NODE_TYPE="m5.large"export CORTEX_NODES_MIN="2"export CORTEX_NODES_MAX="5"​# Provision infrastructure on AWS and install Cortex./cortex.sh install
This will create resources in your AWS account which aren't included in the free teir, e.g. an EKS cluster, two Elastic Load Balancers, and EC2 instances (quantity and type as specified above). To use GPU nodes, you may need to subscribe to the EKS-optimized AMI with GPU Support and file an AWS support ticket to incease the limit for your desired instance type.
# Clone the Cortex repositorygit clone -b 0.8 https://github.com/cortexlabs/cortex.git​# Navigate to the iris classification examplecd cortex/examples/iris-classifier​# Deploy the model to the clustercortex deploy​# View the status of the deploymentcortex get --watch​# Get the API's endpointcortex get tensorflow​# Classify a samplecurl -X POST -H "Content-Type: application/json" \-d '{ "sepal_length": 5.2, "sepal_width": 3.6, "petal_length": 1.4, "petal_width": 0.3 }' \<API endpoint>
# Delete the deploymentcortex delete iris
See uninstall if you'd like to uninstall Cortex.