✨ Add run-docker-compatibility-matrix to test more combinations
This commit is contained in:
parent
f0404f00ed
commit
7cb8eb75fa
3 changed files with 21 additions and 2 deletions
|
@ -9,6 +9,6 @@ for tf in tf1 tf2; do
|
|||
esac
|
||||
work_dir=`dirname $0`
|
||||
image_id=`docker build -q --build-arg tf=$tf --build-arg BASE_IMAGE=$BASE_IMAGE -f assets/Dockerfile $work_dir`
|
||||
docker run --gpus all -it --rm $image_id
|
||||
docker run --gpus all -it --rm -e TF_CPP_MIN_LOG_LEVEL=1 $image_id
|
||||
docker rmi $image_id >/dev/null || true
|
||||
done
|
||||
|
|
18
run-docker-compatibility-matrix
Executable file
18
run-docker-compatibility-matrix
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
for tf in tf1 tf2; 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 \
|
||||
; do
|
||||
echo "== $tf $BASE_IMAGE"
|
||||
work_dir=`dirname $0`
|
||||
image_id=`docker build -q --build-arg tf=$tf --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
|
|
@ -5,7 +5,8 @@ import os
|
|||
os.system('nvidia-smi -L')
|
||||
|
||||
|
||||
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '1' # '1' means >= WARN
|
||||
if not 'TF_CPP_MIN_LOG_LEVEL' in os.environ:
|
||||
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '1' # '1' means >= WARN
|
||||
import tensorflow as tf
|
||||
print('TensorFlow', tf.__version__)
|
||||
with tf.compat.v1.Session() as sess:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue