Add run-docker-compatibility-matrix to test more combinations

master
Gerber, Mike 4 years ago
parent f0404f00ed
commit 7cb8eb75fa

@ -9,6 +9,6 @@ for tf in tf1 tf2; do
esac esac
work_dir=`dirname $0` work_dir=`dirname $0`
image_id=`docker build -q --build-arg tf=$tf --build-arg BASE_IMAGE=$BASE_IMAGE -f assets/Dockerfile $work_dir` 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 docker rmi $image_id >/dev/null || true
done done

@ -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.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 import tensorflow as tf
print('TensorFlow', tf.__version__) print('TensorFlow', tf.__version__)
with tf.compat.v1.Session() as sess: with tf.compat.v1.Session() as sess:

Loading…
Cancel
Save