4

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...

1 Answer 1

1

"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).

Sign up to request clarification or add additional context in comments.

2 Comments

okay, I see. it just didn't occur to me that the devel branch only had the source, and didn't include a compiled version too. thanks.
ok, then what is the image for tensorflow with gpu then?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.