Skip to content

Commit ca44cee

Browse files
authored
Build and push cuda images with different cudnn versions (#1575)
1 parent 83d2fe6 commit ca44cee

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

build/build-image.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ if [[ "$image" == *"-slim" ]]; then
3434
fi
3535

3636
if [ "${image}" == "python-predictor-gpu-slim" ]; then
37-
cuda=("10.0" "10.1" "10.2" "11.0")
38-
cudnn=("7" "7" "7" "8")
37+
cuda=("10.0" "10.1" "10.1" "10.2" "10.2" "11.0" "11.1")
38+
cudnn=("7" "7" "8" "7" "8" "8" "8")
3939
for i in ${!cudnn[@]}; do
4040
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]}
41+
docker build "$ROOT" -f $dir/Dockerfile $build_args -t cortexlabs/${image}:${CORTEX_VERSION}-cuda${cuda[$i]}-cudnn${cudnn[$i]}
4242
done
4343
else
4444
docker build "$ROOT" -f $dir/Dockerfile $build_args -t cortexlabs/${image}:${CORTEX_VERSION}

build/push-image.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ image=$1
2424
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
2525

2626
if [ "$image" == "python-predictor-gpu-slim" ]; then
27-
for cuda in 10.0 10.1 10.2 11.0; do
28-
docker push cortexlabs/${image}:${CORTEX_VERSION}-cuda${cuda}
27+
cuda=("10.0" "10.1" "10.1" "10.2" "10.2" "11.0" "11.1")
28+
cudnn=("7" "7" "8" "7" "8" "8" "8")
29+
for i in ${!cudnn[@]}; do
30+
docker push cortexlabs/${image}:${CORTEX_VERSION}-cuda${cuda[$i]}-cudnn${cudnn[$i]}
2931
done
3032
else
3133
docker push cortexlabs/${image}:${CORTEX_VERSION}

docs/deployments/system-packages.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,16 @@ mkdir my-api && cd my-api && touch Dockerfile
4848

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

51-
<!-- CORTEX_VERSION_BRANCH_STABLE x6 -->
51+
<!-- CORTEX_VERSION_BRANCH_STABLE x12 -->
5252
* Python Predictor (CPU): `cortexlabs/python-predictor-cpu-slim:master`
53-
* Python Predictor (GPU): `cortexlabs/python-predictor-gpu-slim:master-cuda10.1` (also available in cuda10.0, cuda10.2, and cuda11.0)
53+
* 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`
5461
* Python Predictor (Inferentia): `cortexlabs/python-predictor-inf-slim:master`
5562
* TensorFlow Predictor (CPU, GPU, Inferentia): `cortexlabs/tensorflow-predictor-slim:master`
5663
* ONNX Predictor (CPU): `cortexlabs/onnx-predictor-cpu-slim:master`

0 commit comments

Comments
 (0)