I'm trying to use tensorflow in docker, following the instructions at
https://www.tensorflow.org/install/docker
I have docker 19.03 installed on a centos 7.7.1908 machine, and I can run nvidia-smi
docker run --gpus all nvidia/cuda:10.1-base nvidia-smi
my understanding is that the use of nvidia-docker is deprecated. then I download tensorflow
docker pull tensorflow/tensorflow:latest-devel-py3
or
docker pull tensorflow/tensorflow:devel-gpu
but when I run one of them
docker run -it --rm tensorflow/tensorflow:latest-devel-py3 python -c "import tensorflow as tf;"
I get
Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'tensorflow' failed to resize tty, using default size
what am I missing?
well, I've since found out that
latest-gpu-py3
allows me to import tensorflow, whereas
latest-devel-py3
doesn't. I'd've thought that all these images would work...