Sign inSign up

deephdc/tensorflow

By deephdc

Updated almost 7 years ago

Custom TF 1.10/1.12 images with Ubuntu18.04 and python3.6

Image
0

589

deephdc/tensorflow repository overview

Custom Tensorflow images

Build Status

The Dockerfiles to build images are based on the original Tensorflow Dockerfiles. The compatibility of CUDA/CUDNN versions for the GPU images can be found here.

We build cpu/gpu images for Ubuntu 18.04, Python 3.6 and Tensorflow versions 1.10.0/1.12.0, as original Tensorflow images use Ubuntu 16.04 and python 3.5.

Building

The Dockerfiles in the dockerfiles directory must have their build context set to the directory with this README.md to copy in helper files. For example:

$ docker build -f ./dockerfiles/cpu.Dockerfile -t tensorflow .

This builds a tensorflow CPU-based image with the latest TensorFlow version, Ubuntu 18.04, and python3. Each Dockerfile has its own set of available --build-args which are documented in the Dockerfile itself.

PLEASE NOTE, Dockerfiles are preliminary versions and may need further customization!

Running Locally Built Images

After building the image with the tag tensorflow (for example), use docker run to run the images.

Note for new Docker users: the -v and -u flags share directories and permissions between the Docker container and your machine. Without -v, your work will be wiped once the container quits, and without -u, files created by the container will have the wrong file permissions on your host machine. Check out the Docker run documentation for more info.

# Volume mount (-v) is optional but highly recommended, especially for Jupyter.
# User permissions (-u) are required if you use (-v).

# CPU-based images
$ docker run -u $(id -u):$(id -g) -v $(pwd):/my-devel -it tensorflow

# GPU-based images (set up [nvidia-docker2](https://github.com/NVIDIA/nvidia-docker) first)
$ docker run --runtime=nvidia -u $(id -u):$(id -g) -v $(pwd):/my-devel -it tensorflow

N.B. For either CPU-based or GPU-based images you can also use udocker.

P.S. These images do not come with the TensorFlow source code.

Tag summary

Content type

Image

Digest

Size

287.8 MB

Last updated

almost 7 years ago

docker pull deephdc/tensorflow:1.12.0-py36