Skip to content

Commit 5e73122

Browse files
ospillingerdeliahu
authored andcommitted
Update docs and examples
(cherry picked from commit 0194866)
1 parent 34e3eb3 commit 5e73122

File tree

6 files changed

+45
-39
lines changed

6 files changed

+45
-39
lines changed

docs/cluster/config.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,57 +11,57 @@ The Cortex cluster may be configured by providing a configuration file to `corte
1111
aws_access_key_id: ***
1212
aws_secret_access_key: ***
1313

14-
# Optional AWS credentials for the Operator which may be used to restrict its AWS access (defaults to the AWS credentials set above)
14+
# optional AWS credentials for the operator which may be used to restrict its AWS access (defaults to the AWS credentials set above)
1515
cortex_aws_access_key_id: ***
1616
cortex_aws_secret_access_key: ***
1717

18-
# Instance type Cortex will use
18+
# AWS region
19+
region: us-west-2
20+
21+
# S3 bucket
22+
bucket: cortex-<RANDOM_ID>
23+
24+
# instance type
1925
instance_type: m5.large
2026

21-
# Minimum number of worker instances in the cluster (must be >= 0)
27+
# minimum number of instances (must be >= 0)
2228
min_instances: 1
2329

24-
# Maximum number of worker instances in the cluster (must be >= 1)
30+
# maximum number of instances (must be >= 1)
2531
max_instances: 5
2632

27-
# Volume size in Gi for worker instances in the cluster (default: 50)
33+
# instance volume size (GB) (default: 50)
2834
instance_volume_size: 50
2935

30-
# Name of the S3 bucket Cortex will use
31-
bucket: cortex-<RANDOM_ID>
32-
33-
# Region Cortex will use
34-
region: us-west-2
35-
36-
# Name of the CloudWatch log group Cortex will use
36+
# CloudWatch log group for cortex
3737
log_group: cortex
3838

39-
# Name of the EKS cluster Cortex will create
39+
# EKS cluster name for cortex (default: cortex)
4040
cluster_name: cortex
4141

42-
# Flag to enable collection of anonymous usage stats and error reports
42+
# whether to collect anonymous usage stats and error reports (default: true)
4343
telemetry: true
4444

45-
# Flag to enable using spot instances in worker cluster (default: true)
45+
# whether to use spot instances in the cluster (default: true)
4646
spot: true
4747

4848
spot_config:
49-
# List of additional instances with identical or better specs than your primary instance type (defaults to 2 compatible instances sorted by price)
49+
# additional instances with identical or better specs than the primary instance type (defaults to 2 instances sorted by price)
5050
instance_distribution: [t3.large, t3a.large]
5151

52-
# The minimum number of instances in your cluster that should be on demand (default: 0)
52+
# minimum number of on demand instances (default: 0)
5353
on_demand_base_capacity: 0
5454

55-
# The percentage of on demand instances to use after the on demand base capacity has been met [0, 100] (default: 0)
55+
# percentage of on demand instances to use after the on demand base capacity has been met [0, 100] (default: 0)
5656
on_demand_percentage_above_base_capacity: 0
5757

58-
# The max price for instances (defaults to the on demand price of the primary instance type)
58+
# max price for instances (defaults to the on demand price of the primary instance type)
5959
max_price: 0.096
6060

61-
# The number of Spot Instance pools across which to allocate Spot instances [1, 20] (default: 2)
61+
# number of spot instance pools across which to allocate spot instances [1, 20] (default: 2)
6262
spot_instance_pools: 2
6363

64-
# Image paths
64+
# docker image paths
6565
image_predictor_serve: cortexlabs/predictor-serve:0.11.0
6666
image_predictor_serve_gpu: cortexlabs/predictor-serve-gpu:0.11.0
6767
image_tf_serve: cortexlabs/tf-serve:0.11.0

docs/cluster/install.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ See [cluster configuration](config.md) to learn how you can customize your clust
1111

1212
<!-- CORTEX_VERSION_MINOR -->
1313
```bash
14-
# Install the Cortex CLI on your machine
14+
# install the Cortex CLI on your machine
1515
bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/0.11/get-cli.sh)"
1616

17-
# Provision infrastructure on AWS and install Cortex
17+
# provision infrastructure on AWS and install Cortex
1818
cortex cluster up
1919
```
2020

@@ -25,22 +25,22 @@ Note: This will create resources in your AWS account which aren't included in th
2525
<!-- CORTEX_VERSION_MINOR -->
2626

2727
```bash
28-
# Clone the Cortex repository
28+
# clone the Cortex repository
2929
git clone -b 0.11 https://github.com/cortexlabs/cortex.git
3030

31-
# Navigate to the iris classifier example
31+
# navigate to the iris classifier example
3232
cd cortex/examples/sklearn/iris-classifier
3333

34-
# Deploy the model to the cluster
34+
# deploy the model to the cluster
3535
cortex deploy
3636

37-
# View the status of the deployment
37+
# view the status of the deployment
3838
cortex get --watch
3939

40-
# Get the API's endpoint
40+
# get the API's endpoint
4141
cortex get classifier
4242

43-
# Classify a sample
43+
# classify a sample
4444
curl -X POST -H "Content-Type: application/json" \
4545
-d '{ "sepal_length": 5.2, "sepal_width": 3.6, "petal_length": 1.4, "petal_width": 0.3 }' \
4646
<API endpoint>
@@ -49,7 +49,7 @@ curl -X POST -H "Content-Type: application/json" \
4949
## Cleanup
5050

5151
```bash
52-
# Delete the deployment
52+
# delete the deployment
5353
cortex delete iris
5454
```
5555

docs/cluster/uninstall.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
## Uninstalling Cortex
1111

1212
```bash
13-
# Spin down the cluster
13+
# spin down the cluster
1414
cortex cluster down
1515

16-
# Uninstall the CLI
16+
# uninstall the CLI
1717
sudo rm /usr/local/bin/cortex
1818
rm -rf ~/.cortex
1919
```
@@ -23,14 +23,14 @@ If you modified your bash profile, you may wish to remove `source <(cortex compl
2323
## Cleaning up AWS
2424

2525
```bash
26-
# Set AWS credentials
26+
# set AWS credentials
2727
export AWS_ACCESS_KEY_ID=***
2828
export AWS_SECRET_ACCESS_KEY=***
2929

30-
# Delete the S3 bucket
30+
# delete the S3 bucket
3131
aws s3 ls
3232
aws s3 rb --force s3://<bucket-name>
3333

34-
# Delete the log group
34+
# delete the log group
3535
aws logs describe-log-groups --log-group-name-prefix=<log_group_name> --query logGroups[*].[logGroupName] --output text | xargs -I {} aws logs delete-log-group --log-group-name {}
3636
```

docs/cluster/update.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ cortex cluster update
1818
<!-- CORTEX_VERSION_MINOR -->
1919

2020
```bash
21-
# Spin down your cluster
21+
# spin down your cluster
2222
cortex cluster down
2323

24-
# Update your CLI
24+
# update your CLI
2525
bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/0.11/get-cli.sh)"
2626

27-
# Confirm version
27+
# confirm version
2828
cortex version
2929

30-
# Spin up your cluster
30+
# spin up your cluster
3131
cortex cluster up
3232
```

examples/tensorflow/image-classifier/cortex.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@
88
request_handler: handler.py
99
tracker:
1010
model_type: classification
11+
compute:
12+
cpu: 1
13+
gpu: 1

examples/tensorflow/sentiment-analyzer/cortex.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@
88
request_handler: handler.py
99
tracker:
1010
model_type: classification
11+
compute:
12+
cpu: 1
13+
gpu: 1

0 commit comments

Comments
 (0)