Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ redirects:
tutorial: ../examples/pytorch/text-generator/README.md
tutorial/realtime: ../examples/pytorch/text-generator/README.md
tutorial/batch: ../examples/batch/image-classifier/README.md
install: ./aws/install.md
uninstall: ./aws/uninstall.md
update: ./aws/update.md
install: ./cloud/install.md
uninstall: ./cloud/uninstall.md
update: ./cloud/update.md
15 changes: 15 additions & 0 deletions docs/cloud/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Install

_WARNING: you are on the master branch, please refer to the docs on the branch that matches your `cortex version`_

## AWS

To spin up Cortex using AWS as the cloud provider, follow [these instructions](../aws/install.md).

## GCP

To spin up Cortex using GCP as the cloud provider, follow [these instructions](../gcp/install.md).

## Local

If you'll only be using Cortex locally, install it with `pip install cortex`.
15 changes: 15 additions & 0 deletions docs/cloud/uninstall.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Uninstall

_WARNING: you are on the master branch, please refer to the docs on the branch that matches your `cortex version`_

## AWS

To spin down a Cortex cluster on AWS, follow [these instructions](../aws/uninstall.md).

## GCP

To spin down a Cortex cluster on GCP, follow [these instructions](../gcp/uninstall.md).

## Local

To uninstall the Cortex CLI, run `pip uninstall cortex`.
11 changes: 11 additions & 0 deletions docs/cloud/update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Update

_WARNING: you are on the master branch, please refer to the docs on the branch that matches your `cortex version`_

## AWS

To update the configuration of a running Cortex cluster on AWS, follow [these instructions](../aws/update.md).

## GCP

It is currently not possible to update a Cortex cluster running on GCP.
4 changes: 4 additions & 0 deletions docs/deployments/batch-api/predictors.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ cloudpickle==1.6.0
Cython==0.29.21
dill==0.3.2
fastapi==0.61.1
google-cloud-storage==1.32.0
joblib==0.16.0
Keras==2.4.3
msgpack==1.0.0
Expand Down Expand Up @@ -143,6 +144,7 @@ cloudpickle==1.6.0
Cython==0.29.21
dill==0.3.1.1
fastapi==0.54.1
google-cloud-storage==1.32.0
joblib==0.16.0
msgpack==1.0.0
neuron-cc==1.0.20600.0+0.b426b885f
Expand Down Expand Up @@ -244,6 +246,7 @@ The following Python packages are pre-installed in TensorFlow Predictors and can
boto3==1.14.53
dill==0.3.2
fastapi==0.61.1
google-cloud-storage==1.32.0
msgpack==1.0.0
numpy==1.19.1
opencv-python==4.4.0.42
Expand Down Expand Up @@ -331,6 +334,7 @@ The following Python packages are pre-installed in ONNX Predictors and can be us
boto3==1.14.53
dill==0.3.2
fastapi==0.61.1
google-cloud-storage==1.32.0
msgpack==1.0.0
numpy==1.19.1
onnxruntime==1.4.0
Expand Down
4 changes: 4 additions & 0 deletions docs/deployments/realtime-api/predictors.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ cloudpickle==1.6.0
Cython==0.29.21
dill==0.3.2
fastapi==0.61.1
google-cloud-storage==1.32.0
joblib==0.16.0
Keras==2.4.3
msgpack==1.0.0
Expand Down Expand Up @@ -236,6 +237,7 @@ cloudpickle==1.6.0
Cython==0.29.21
dill==0.3.1.1
fastapi==0.54.1
google-cloud-storage==1.32.0
joblib==0.16.0
msgpack==1.0.0
neuron-cc==1.0.20600.0+0.b426b885f
Expand Down Expand Up @@ -362,6 +364,7 @@ The following Python packages are pre-installed in TensorFlow Predictors and can
boto3==1.14.53
dill==0.3.2
fastapi==0.61.1
google-cloud-storage==1.32.0
msgpack==1.0.0
numpy==1.19.1
opencv-python==4.4.0.42
Expand Down Expand Up @@ -478,6 +481,7 @@ The following Python packages are pre-installed in ONNX Predictors and can be us
boto3==1.14.53
dill==0.3.2
fastapi==0.61.1
google-cloud-storage==1.32.0
msgpack==1.0.0
numpy==1.19.1
onnxruntime==1.4.0
Expand Down
12 changes: 12 additions & 0 deletions docs/gcp/credentials.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Credentials

_WARNING: you are on the master branch, please refer to the docs on the branch that matches your `cortex version`_

1. Create a service account for your GCP project as described [here](https://cloud.google.com/iam/docs/creating-managing-service-accounts#iam-service-accounts-create-console) with the following roles (these roles could be more restrictive if required):
1. `Editor` role.
1. `Kubernetes Engine Admin` role.
1. `Container Registry Service Agent` role.
1. `Storage Admin` role.
1. `Storage Object Admin` role.
1. Generate a service account key for your service account as described [here](https://cloud.google.com/iam/docs/creating-managing-service-account-keys) and export it as a JSON file.
1. Export the `GOOGLE_APPLICATION_CREDENTIALS` variable and point it to the downloaded service account key from the previous step. For example: `export GOOGLE_APPLICATION_CREDENTIALS=/home/ubuntu/.config/gcloud/sample-269400-9a41792a969b.json`
66 changes: 66 additions & 0 deletions docs/gcp/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Install

_WARNING: you are on the master branch, please refer to the docs on the branch that matches your `cortex version`_

## Spin up Cortex on your GCP account

Make sure [Docker](https://docs.docker.com/install) is running on your machine.

If you're using GPUs, make sure your GPU quota is sufficient (see [here](https://cloud.google.com/compute/quotas)).

```bash
# 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)

# set the default environment
cortex env default gcp
```

<!-- CORTEX_VERSION_MINOR -->
Try the [tutorial](../../examples/pytorch/text-generator/README.md).

## Configure Cortex

<!-- CORTEX_VERSION_MINOR -->
```yaml
# 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

# GPU to attach to your instance (optional)
accelerator_type: nvidia-tesla-t4

# minimum number of instances
min_instances: 1

# maximum number of instances
max_instances: 5
```

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

<!-- CORTEX_VERSION_BRANCH_STABLE -->
```yaml
image_operator: quay.io/cortexlabs/operator:master
image_manager: quay.io/cortexlabs/manager:master
image_downloader: quay.io/cortexlabs/downloader:master
image_statsd: quay.io/cortexlabs/statsd:master
image_istio_proxy: quay.io/cortexlabs/istio-proxy:master
image_istio_pilot: quay.io/cortexlabs/istio-pilot:master
image_pause: quay.io/cortexlabs/pause:master
```

The default docker images used for your Predictors are listed in the instructions for [system packages](../deployments/system-packages.md), and can be overridden in your [Realtime API configuration](../deployments/realtime-api/api-configuration.md).
18 changes: 18 additions & 0 deletions docs/gcp/uninstall.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Uninstall

_WARNING: you are on the master branch, please refer to the docs on the branch that matches your `cortex version`_

## Spin down Cortex

```bash
# spin down Cortex
cortex cluster-gcp down

# uninstall the CLI
pip uninstall cortex
rm -rf ~/.cortex
```

If you modified your bash profile, you may wish to remove `source <(cortex completion bash)` from it (or remove `source <(cortex completion zsh)` for `zsh`).

*Note: The `cortex cluster-gcp down` command doesn't wait for the cluster to come down. You can ensure that the cluster has been removed by checking the GKE console.*
9 changes: 8 additions & 1 deletion docs/summary.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Table of contents

* [Deploy machine learning models to production](../README.md)
* [Install](aws/install.md)
* [Install](cloud/install.md)
* [Tutorial](https://docs.cortex.dev/v/master/deployments/realtime-api/text-generator) <!-- CORTEX_VERSION_MINOR -->
* [GitHub](https://github.com/cortexlabs/cortex)
* [Examples](https://github.com/cortexlabs/cortex/tree/master/examples) <!-- CORTEX_VERSION_MINOR -->
* [Contact us](contact.md)

## Running Cortex on AWS

* [Install](aws/install.md)
* [Credentials](aws/credentials.md)
* [Security](aws/security.md)
* [Spot instances](aws/spot.md)
Expand All @@ -20,6 +21,12 @@
* [Update](aws/update.md)
* [Uninstall](aws/uninstall.md)

## Running Cortex on GCP

* [Install](gcp/install.md)
* [Credentials](gcp/credentials.md)
* [Uninstall](gcp/uninstall.md)

## Deployments

* [Realtime API](deployments/realtime-api.md)
Expand Down