Skip to content

Commit 90ec64b

Browse files
authored
Switch to Quay docker registry (#1578)
1 parent 33486b8 commit 90ec64b

File tree

10 files changed

+60
-55
lines changed

10 files changed

+60
-55
lines changed

.circleci/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ jobs:
4545
build-and-deploy:
4646
docker:
4747
- image: circleci/python:3.6
48+
auth:
49+
username: $QUAY_USERNAME
50+
password: $QUAY_PASSWORD
4851
environment:
4952
NUM_BUILD_PROCS: "2"
5053
steps:

build/build-image.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ set -euo pipefail
2020
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. >/dev/null && pwd)"
2121

2222
CORTEX_VERSION=master
23+
REGISTRY_URL=quay.io
2324

2425
image=$1
2526
dir="${ROOT}/images/${image/-slim}"
@@ -38,8 +39,8 @@ if [ "${image}" == "python-predictor-gpu-slim" ]; then
3839
cudnn=("7" "7" "8" "7" "8" "8" "8")
3940
for i in ${!cudnn[@]}; do
4041
build_args="${build_args} --build-arg CUDA_VERSION=${cuda[$i]} --build-arg CUDNN=${cudnn[$i]}"
41-
docker build "$ROOT" -f $dir/Dockerfile $build_args -t cortexlabs/${image}:${CORTEX_VERSION}-cuda${cuda[$i]}-cudnn${cudnn[$i]}
42+
docker build "$ROOT" -f $dir/Dockerfile $build_args -t $REGISTRY_URL/cortexlabs/${image}:${CORTEX_VERSION}-cuda${cuda[$i]}-cudnn${cudnn[$i]}
4243
done
4344
else
44-
docker build "$ROOT" -f $dir/Dockerfile $build_args -t cortexlabs/${image}:${CORTEX_VERSION}
45+
docker build "$ROOT" -f $dir/Dockerfile $build_args -t $REGISTRY_URL/cortexlabs/${image}:${CORTEX_VERSION}
4546
fi

build/push-image.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
set -euo pipefail
1919

2020
CORTEX_VERSION=master
21+
REGISTRY_URL=quay.io
2122

2223
image=$1
2324

@@ -27,8 +28,8 @@ if [ "$image" == "python-predictor-gpu-slim" ]; then
2728
cuda=("10.0" "10.1" "10.1" "10.2" "10.2" "11.0" "11.1")
2829
cudnn=("7" "7" "8" "7" "8" "8" "8")
2930
for i in ${!cudnn[@]}; do
30-
docker push cortexlabs/${image}:${CORTEX_VERSION}-cuda${cuda[$i]}-cudnn${cudnn[$i]}
31+
docker push $REGISTRY_URL/cortexlabs/${image}:${CORTEX_VERSION}-cuda${cuda[$i]}-cudnn${cudnn[$i]}
3132
done
3233
else
33-
docker push cortexlabs/${image}:${CORTEX_VERSION}
34+
docker push $REGISTRY_URL/cortexlabs/${image}:${CORTEX_VERSION}
3435
fi

docs/cluster-management/config.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,17 @@ The docker images used by the Cortex cluster can also be overridden, although th
8484
<!-- CORTEX_VERSION_BRANCH_STABLE -->
8585
```yaml
8686
# docker image paths
87-
image_operator: cortexlabs/operator:master
88-
image_manager: cortexlabs/manager:master
89-
image_downloader: cortexlabs/downloader:master
90-
image_request_monitor: cortexlabs/request-monitor:master
91-
image_cluster_autoscaler: cortexlabs/cluster-autoscaler:master
92-
image_metrics_server: cortexlabs/metrics-server:master
93-
image_inferentia: cortexlabs/inferentia:master
94-
image_neuron_rtd: cortexlabs/neuron-rtd:master
95-
image_nvidia: cortexlabs/nvidia:master
96-
image_fluentd: cortexlabs/fluentd:master
97-
image_statsd: cortexlabs/statsd:master
98-
image_istio_proxy: cortexlabs/istio-proxy:master
99-
image_istio_pilot: cortexlabs/istio-pilot:master
87+
image_operator: quay.io/cortexlabs/operator:master
88+
image_manager: quay.io/cortexlabs/manager:master
89+
image_downloader: quay.io/cortexlabs/downloader:master
90+
image_request_monitor: quay.io/cortexlabs/request-monitor:master
91+
image_cluster_autoscaler: quay.io/cortexlabs/cluster-autoscaler:master
92+
image_metrics_server: quay.io/cortexlabs/metrics-server:master
93+
image_inferentia: quay.io/cortexlabs/inferentia:master
94+
image_neuron_rtd: quay.io/cortexlabs/neuron-rtd:master
95+
image_nvidia: quay.io/cortexlabs/nvidia:master
96+
image_fluentd: quay.io/cortexlabs/fluentd:master
97+
image_statsd: quay.io/cortexlabs/statsd:master
98+
image_istio_proxy: quay.io/cortexlabs/istio-proxy:master
99+
image_istio_pilot: quay.io/cortexlabs/istio-pilot:master
100100
```

docs/deployments/batch-api/api-configuration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Reference the section below which corresponds to your Predictor type: [Python](#
1616
path: <string> # path to a python file with a PythonPredictor class definition, relative to the Cortex root (required)
1717
config: <string: value> # arbitrary dictionary passed to the constructor of the Predictor (can be overridden by config passed in job submission) (optional)
1818
python_path: <string> # path to the root of your Python folder that will be appended to PYTHONPATH (default: folder containing cortex.yaml)
19-
image: <string> # docker image to use for the Predictor (default: cortexlabs/python-predictor-cpu or cortexlabs/python-predictor-gpu based on compute)
19+
image: <string> # docker image to use for the Predictor (default: quay.io/cortexlabs/python-predictor-cpu or quay.io/cortexlabs/python-predictor-gpu based on compute)
2020
env: <string: string> # dictionary of environment variables
2121
networking:
2222
endpoint: <string> # the endpoint for the API (default: <api_name>)
@@ -50,8 +50,8 @@ See additional documentation for [compute](../compute.md), [networking](../netwo
5050
batch_interval: <duration> # the maximum amount of time to spend waiting for additional requests before running inference on the batch of requests
5151
config: <string: value> # arbitrary dictionary passed to the constructor of the Predictor (can be overridden by config passed in job submission) (optional)
5252
python_path: <string> # path to the root of your Python folder that will be appended to PYTHONPATH (default: folder containing cortex.yaml)
53-
image: <string> # docker image to use for the Predictor (default: cortexlabs/tensorflow-predictor)
54-
tensorflow_serving_image: <string> # docker image to use for the TensorFlow Serving container (default: cortexlabs/tensorflow-serving-gpu or cortexlabs/tensorflow-serving-cpu based on compute)
53+
image: <string> # docker image to use for the Predictor (default: quay.io/cortexlabs/tensorflow-predictor)
54+
tensorflow_serving_image: <string> # docker image to use for the TensorFlow Serving container (default: quay.io/cortexlabs/tensorflow-serving-gpu or quay.io/cortexlabs/tensorflow-serving-cpu based on compute)
5555
env: <string: string> # dictionary of environment variables
5656
networking:
5757
endpoint: <string> # the endpoint for the API (default: <api_name>)
@@ -81,7 +81,7 @@ See additional documentation for [compute](../compute.md), [networking](../netwo
8181
...
8282
config: <string: value> # arbitrary dictionary passed to the constructor of the Predictor (can be overridden by config passed in job submission) (optional)
8383
python_path: <string> # path to the root of your Python folder that will be appended to PYTHONPATH (default: folder containing cortex.yaml)
84-
image: <string> # docker image to use for the Predictor (default: cortexlabs/onnx-predictor-gpu or cortexlabs/onnx-predictor-cpu based on compute)
84+
image: <string> # docker image to use for the Predictor (default: quay.io/cortexlabs/onnx-predictor-gpu or quay.io/cortexlabs/onnx-predictor-cpu based on compute)
8585
env: <string: string> # dictionary of environment variables
8686
networking:
8787
endpoint: <string> # the endpoint for the API (default: <api_name>)

docs/deployments/realtime-api/api-configuration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Reference the section below which corresponds to your Predictor type: [Python](#
2727
threads_per_process: <int> # the number of threads per process (default: 1)
2828
config: <string: value> # arbitrary dictionary passed to the constructor of the Predictor (optional)
2929
python_path: <string> # path to the root of your Python folder that will be appended to PYTHONPATH (default: folder containing cortex.yaml)
30-
image: <string> # docker image to use for the Predictor (default: cortexlabs/python-predictor-cpu or cortexlabs/python-predictor-gpu based on compute)
30+
image: <string> # docker image to use for the Predictor (default: quay.io/cortexlabs/python-predictor-cpu or quay.io/cortexlabs/python-predictor-gpu based on compute)
3131
env: <string: string> # dictionary of environment variables
3232
networking:
3333
endpoint: <string> # the endpoint for the API (aws only) (default: <api_name>)
@@ -88,8 +88,8 @@ See additional documentation for [models](models.md), [parallelism](parallelism.
8888
threads_per_process: <int> # the number of threads per process (default: 1)
8989
config: <string: value> # arbitrary dictionary passed to the constructor of the Predictor (optional)
9090
python_path: <string> # path to the root of your Python folder that will be appended to PYTHONPATH (default: folder containing cortex.yaml)
91-
image: <string> # docker image to use for the Predictor (default: cortexlabs/tensorflow-predictor)
92-
tensorflow_serving_image: <string> # docker image to use for the TensorFlow Serving container (default: cortexlabs/tensorflow-serving-gpu or cortexlabs/tensorflow-serving-cpu based on compute)
91+
image: <string> # docker image to use for the Predictor (default: quay.io/cortexlabs/tensorflow-predictor)
92+
tensorflow_serving_image: <string> # docker image to use for the TensorFlow Serving container (default: quay.io/cortexlabs/tensorflow-serving-gpu or quay.io/cortexlabs/tensorflow-serving-cpu based on compute)
9393
env: <string: string> # dictionary of environment variables
9494
networking:
9595
endpoint: <string> # the endpoint for the API (aws only) (default: <api_name>)
@@ -145,7 +145,7 @@ See additional documentation for [models](models.md), [parallelism](parallelism.
145145
threads_per_process: <int> # the number of threads per process (default: 1)
146146
config: <string: value> # arbitrary dictionary passed to the constructor of the Predictor (optional)
147147
python_path: <string> # path to the root of your Python folder that will be appended to PYTHONPATH (default: folder containing cortex.yaml)
148-
image: <string> # docker image to use for the Predictor (default: cortexlabs/onnx-predictor-gpu or cortexlabs/onnx-predictor-cpu based on compute)
148+
image: <string> # docker image to use for the Predictor (default: quay.io/cortexlabs/onnx-predictor-gpu or quay.io/cortexlabs/onnx-predictor-cpu based on compute)
149149
env: <string: string> # dictionary of environment variables
150150
networking:
151151
endpoint: <string> # the endpoint for the API (aws only) (default: <api_name>)

docs/deployments/system-packages.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@ mkdir my-api && cd my-api && touch Dockerfile
4949
Cortex's base Docker images are listed below. Depending on the Cortex Predictor and compute type specified in your API configuration, choose one of these images to use as the base for your Docker image:
5050

5151
<!-- CORTEX_VERSION_BRANCH_STABLE x12 -->
52-
* Python Predictor (CPU): `cortexlabs/python-predictor-cpu-slim:master`
52+
* Python Predictor (CPU): `quay.io/cortexlabs/python-predictor-cpu-slim:master`
5353
* Python Predictor (GPU): choose one of the following:
54-
* `cortexlabs/python-predictor-gpu-slim:master-cuda10.0-cudnn7`
55-
* `cortexlabs/python-predictor-gpu-slim:master-cuda10.1-cudnn7`
56-
* `cortexlabs/python-predictor-gpu-slim:master-cuda10.1-cudnn8`
57-
* `cortexlabs/python-predictor-gpu-slim:master-cuda10.2-cudnn7`
58-
* `cortexlabs/python-predictor-gpu-slim:master-cuda10.2-cudnn8`
59-
* `cortexlabs/python-predictor-gpu-slim:master-cuda11.0-cudnn8`
60-
* `cortexlabs/python-predictor-gpu-slim:master-cuda11.1-cudnn8`
61-
* Python Predictor (Inferentia): `cortexlabs/python-predictor-inf-slim:master`
62-
* TensorFlow Predictor (CPU, GPU, Inferentia): `cortexlabs/tensorflow-predictor-slim:master`
63-
* ONNX Predictor (CPU): `cortexlabs/onnx-predictor-cpu-slim:master`
64-
* ONNX Predictor (GPU): `cortexlabs/onnx-predictor-gpu-slim:master`
54+
* `quay.io/cortexlabs/python-predictor-gpu-slim:master-cuda10.0-cudnn7`
55+
* `quay.io/cortexlabs/python-predictor-gpu-slim:master-cuda10.1-cudnn7`
56+
* `quay.io/cortexlabs/python-predictor-gpu-slim:master-cuda10.1-cudnn8`
57+
* `quay.io/cortexlabs/python-predictor-gpu-slim:master-cuda10.2-cudnn7`
58+
* `quay.io/cortexlabs/python-predictor-gpu-slim:master-cuda10.2-cudnn8`
59+
* `quay.io/cortexlabs/python-predictor-gpu-slim:master-cuda11.0-cudnn8`
60+
* `quay.io/cortexlabs/python-predictor-gpu-slim:master-cuda11.1-cudnn8`
61+
* Python Predictor (Inferentia): `quay.io/cortexlabs/python-predictor-inf-slim:master`
62+
* TensorFlow Predictor (CPU, GPU, Inferentia): `quay.io/cortexlabs/tensorflow-predictor-slim:master`
63+
* ONNX Predictor (CPU): `quay.io/cortexlabs/onnx-predictor-cpu-slim:master`
64+
* ONNX Predictor (GPU): `quay.io/cortexlabs/onnx-predictor-gpu-slim:master`
6565

6666
Note: the images listed above use the `-slim` suffix; Cortex's default API images are not `-slim`, since they have additional dependencies installed to cover common use cases. If you are building your own Docker image, starting with a `-slim` Predictor image will result in a smaller image size.
6767

@@ -71,7 +71,7 @@ The sample Dockerfile below inherits from Cortex's Python CPU serving image, and
7171
```dockerfile
7272
# Dockerfile
7373

74-
FROM cortexlabs/python-predictor-cpu-slim:master
74+
FROM quay.io/cortexlabs/python-predictor-cpu-slim:master
7575

7676
RUN apt-get update \
7777
&& apt-get install -y tree \
@@ -132,7 +132,7 @@ Update your API configuration file to point to your image:
132132
...
133133
```
134134

135-
*Note: for [TensorFlow Predictors](#tensorflow-predictor), two containers run together to serve predictions: one runs your Predictor code (`cortexlabs/tensorflow-predictor`), and the other is TensorFlow serving to load the SavedModel (`cortexlabs/tensorflow-serving-gpu` or `cortexlabs/tensorflow-serving-cpu`). There's a second available field `tensorflow_serving_image` that can be used to override the TensorFlow Serving image. Both of the default serving images (`cortexlabs/tensorflow-serving-gpu` and `cortexlabs/tensorflow-serving-cpu`) are based on the official TensorFlow Serving image (`tensorflow/serving`). Unless a different version of TensorFlow Serving is required, the TensorFlow Serving image shouldn't have to be overridden, since it's only used to load the SavedModel and does not run your Predictor code.*
135+
*Note: for [TensorFlow Predictors](#tensorflow-predictor), two containers run together to serve predictions: one runs your Predictor code (`quay.io/cortexlabs/tensorflow-predictor`), and the other is TensorFlow serving to load the SavedModel (`quay.io/cortexlabs/tensorflow-serving-gpu` or `quay.io/cortexlabs/tensorflow-serving-cpu`). There's a second available field `tensorflow_serving_image` that can be used to override the TensorFlow Serving image. Both of the default serving images (`quay.io/cortexlabs/tensorflow-serving-gpu` and `quay.io/cortexlabs/tensorflow-serving-cpu`) are based on the official TensorFlow Serving image (`tensorflow/serving`). Unless a different version of TensorFlow Serving is required, the TensorFlow Serving image shouldn't have to be overridden, since it's only used to load the SavedModel and does not run your Predictor code.*
136136

137137
Deploy your API as usual:
138138

pkg/consts/consts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ func defaultDockerImage(imageName string) string {
6262
return fmt.Sprintf("%s/%s:latest", imageOverride, imageName)
6363
}
6464

65-
return fmt.Sprintf("cortexlabs/%s:%s", imageName, CortexVersion)
65+
return fmt.Sprintf("quay.io/cortexlabs/%s:%s", imageName, CortexVersion)
6666
}

pkg/lib/configreader/validators.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ func DurationParser(v *DurationValidation) func(string) (interface{}, error) {
152152
}
153153

154154
func ValidateImageVersion(image, cortexVersion string) (string, error) {
155-
if !strings.HasPrefix(image, "cortexlabs/") && !strings.HasPrefix(image, "cortexlabsdev/") {
155+
if !strings.HasPrefix(image, "quay.io/cortexlabs/") && !strings.HasPrefix(image, "quay.io/cortexlabsdev/") && !strings.HasPrefix(image, "cortexlabs/") && !strings.HasPrefix(image, "cortexlabsdev/") {
156156
return image, nil
157157
}
158158

pkg/types/clusterconfig/clusterconfig.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -353,91 +353,91 @@ var UserValidation = &cr.StructValidation{
353353
{
354354
StructField: "ImageOperator",
355355
StringValidation: &cr.StringValidation{
356-
Default: "cortexlabs/operator:" + consts.CortexVersion,
356+
Default: "quay.io/cortexlabs/operator:" + consts.CortexVersion,
357357
Validator: validateImageVersion,
358358
},
359359
},
360360
{
361361
StructField: "ImageManager",
362362
StringValidation: &cr.StringValidation{
363-
Default: "cortexlabs/manager:" + consts.CortexVersion,
363+
Default: "quay.io/cortexlabs/manager:" + consts.CortexVersion,
364364
Validator: validateImageVersion,
365365
},
366366
},
367367
{
368368
StructField: "ImageDownloader",
369369
StringValidation: &cr.StringValidation{
370-
Default: "cortexlabs/downloader:" + consts.CortexVersion,
370+
Default: "quay.io/cortexlabs/downloader:" + consts.CortexVersion,
371371
Validator: validateImageVersion,
372372
},
373373
},
374374
{
375375
StructField: "ImageRequestMonitor",
376376
StringValidation: &cr.StringValidation{
377-
Default: "cortexlabs/request-monitor:" + consts.CortexVersion,
377+
Default: "quay.io/cortexlabs/request-monitor:" + consts.CortexVersion,
378378
Validator: validateImageVersion,
379379
},
380380
},
381381
{
382382
StructField: "ImageClusterAutoscaler",
383383
StringValidation: &cr.StringValidation{
384-
Default: "cortexlabs/cluster-autoscaler:" + consts.CortexVersion,
384+
Default: "quay.io/cortexlabs/cluster-autoscaler:" + consts.CortexVersion,
385385
Validator: validateImageVersion,
386386
},
387387
},
388388
{
389389
StructField: "ImageMetricsServer",
390390
StringValidation: &cr.StringValidation{
391-
Default: "cortexlabs/metrics-server:" + consts.CortexVersion,
391+
Default: "quay.io/cortexlabs/metrics-server:" + consts.CortexVersion,
392392
Validator: validateImageVersion,
393393
},
394394
},
395395
{
396396
StructField: "ImageInferentia",
397397
StringValidation: &cr.StringValidation{
398-
Default: "cortexlabs/inferentia:" + consts.CortexVersion,
398+
Default: "quay.io/cortexlabs/inferentia:" + consts.CortexVersion,
399399
Validator: validateImageVersion,
400400
},
401401
},
402402
{
403403
StructField: "ImageNeuronRTD",
404404
StringValidation: &cr.StringValidation{
405-
Default: "cortexlabs/neuron-rtd:" + consts.CortexVersion,
405+
Default: "quay.io/cortexlabs/neuron-rtd:" + consts.CortexVersion,
406406
Validator: validateImageVersion,
407407
},
408408
},
409409
{
410410
StructField: "ImageNvidia",
411411
StringValidation: &cr.StringValidation{
412-
Default: "cortexlabs/nvidia:" + consts.CortexVersion,
412+
Default: "quay.io/cortexlabs/nvidia:" + consts.CortexVersion,
413413
Validator: validateImageVersion,
414414
},
415415
},
416416
{
417417
StructField: "ImageFluentd",
418418
StringValidation: &cr.StringValidation{
419-
Default: "cortexlabs/fluentd:" + consts.CortexVersion,
419+
Default: "quay.io/cortexlabs/fluentd:" + consts.CortexVersion,
420420
Validator: validateImageVersion,
421421
},
422422
},
423423
{
424424
StructField: "ImageStatsd",
425425
StringValidation: &cr.StringValidation{
426-
Default: "cortexlabs/statsd:" + consts.CortexVersion,
426+
Default: "quay.io/cortexlabs/statsd:" + consts.CortexVersion,
427427
Validator: validateImageVersion,
428428
},
429429
},
430430
{
431431
StructField: "ImageIstioProxy",
432432
StringValidation: &cr.StringValidation{
433-
Default: "cortexlabs/istio-proxy:" + consts.CortexVersion,
433+
Default: "quay.io/cortexlabs/istio-proxy:" + consts.CortexVersion,
434434
Validator: validateImageVersion,
435435
},
436436
},
437437
{
438438
StructField: "ImageIstioPilot",
439439
StringValidation: &cr.StringValidation{
440-
Default: "cortexlabs/istio-pilot:" + consts.CortexVersion,
440+
Default: "quay.io/cortexlabs/istio-pilot:" + consts.CortexVersion,
441441
Validator: validateImageVersion,
442442
},
443443
},
@@ -493,7 +493,7 @@ var AccessValidation = &cr.StructValidation{
493493
{
494494
StructField: "ImageManager",
495495
StringValidation: &cr.StringValidation{
496-
Default: "cortexlabs/manager:" + consts.CortexVersion,
496+
Default: "quay.io/cortexlabs/manager:" + consts.CortexVersion,
497497
Validator: validateImageVersion,
498498
},
499499
},

0 commit comments

Comments
 (0)