Reputation: 43
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...
Upvotes: 4
Views: 1055
Reputation: 26
"devel" image contains tensorflow sources, see: https://hub.docker.com/r/tensorflow/tensorflow/
Quote:
devel images come with Bazel and are ideal for developing changes to TensorFlow at master. /tensorflow_src includes the TensorFlow source tree at the latest nightly commit where the Pip package built successfully in the container. We no longer provide images for developing on top of older versions of TF (1.12.0 was the last release where this was the case).
Upvotes: 1