-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-docker-compatibility-matrix
executable file
·30 lines (26 loc) · 1.17 KB
/
run-docker-compatibility-matrix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
set -e
for tensorflow_version in 1.15 2.4.3 2.5.1 2.6.0; do
# Note: CUDA 11.0 only with CUDNN 8
for BASE_IMAGE in \
nvidia/cuda:10.0-cudnn7-runtime-ubuntu18.04 \
nvidia/cuda:10.1-cudnn7-runtime-ubuntu18.04 \
nvidia/cuda:10.2-cudnn7-runtime-ubuntu18.04 \
nvidia/cuda:11.0-cudnn8-runtime-ubuntu18.04 \
nvidia/cuda:11.1-cudnn8-runtime-ubuntu18.04 \
nvidia/cuda:11.2.1-cudnn8-runtime-ubuntu18.04 \
; do
# According to the docs at https://www.tensorflow.org/install/gpu, we should
# use different package names depending on the major version of TF.
if echo $tensorflow_version | grep -q ^1; then
tensorflow_package=tensorflow-gpu
else
tensorflow_package=tensorflow
fi
echo -n "$tensorflow_package $tensorflow_version $BASE_IMAGE "
work_dir=`dirname $0`
image_id=`docker build -q --build-arg test_nvidia_options="--quiet" --build-arg tensorflow_package=$tensorflow_package --build-arg tensorflow_version=$tensorflow_version --build-arg BASE_IMAGE=$BASE_IMAGE -f assets/Dockerfile $work_dir`
docker run --gpus all -it --rm -e TF_CPP_MIN_LOG_LEVEL=2 $image_id
docker rmi $image_id >/dev/null || true
done
done