Sign inSign up

lmmdock/tensorflow-builder

By lmmdock

•Updated over 7 years ago

Image
0

104

lmmdock/tensorflow-builder repository overview

⁠Compile Tensorflow on Docker

Docker images to compile TensorFlow yourself.

Tensorflow only provide a limited set of build and it can be challenging to compile yourself on certain configuration. With this Dockerfile, you should be able to compile TensorFlow on any Linux platform that run Docker.

Compilation images are provided for Ubuntu 18.10, Ubuntu 16.04, CentOS 7.4 and CentOS 6.6.

⁠Requirements

  • docker
  • docker-compose

⁠Usage

  • Clone this repository:
git clone https://github.com/hadim/docker-tensorflow-builder.git
⁠TensoFlow CPU
  • Edit the build.sh file to modify TensorFlow compilation parameters. Then launch the build:
LINUX_DISTRO="ubuntu-16.04"
# or LINUX_DISTRO="ubuntu-18.10"
# or LINUX_DISTRO="centos-7.4"
# or LINUX_DISTRO="centos-6.6"
cd "tensorflow/$LINUX_DISTRO"

# Set env variables
export PYTHON_VERSION=3.6
export TF_VERSION_GIT_TAG=v1.13.1
export BAZEL_VERSION=0.19
export USE_GPU=0

# Build the Docker image
docker-compose build

# Start the compilation
docker-compose run tf

# You can also do:
# docker-compose run tf bash
# bash build.sh
⁠TensorFlow GPU
  • Edit the build.sh file to modify TensorFlow compilation parameters. Then launch the build:
LINUX_DISTRO="ubuntu-16.04"
# or LINUX_DISTRO="ubuntu-18.10"
# or LINUX_DISTRO="centos-7.4"
# or LINUX_DISTRO="centos-6.6"
cd "tensorflow/$LINUX_DISTRO"

# Set env variables
export PYTHON_VERSION=3.6
export TF_VERSION_GIT_TAG=v1.13.1
export BAZEL_VERSION=0.19
export USE_GPU=1
export CUDA_VERSION=10.0
export CUDNN_VERSION=7.5
export NCCL_VERSION=2.4

# Build the Docker image
docker-compose build

# Start the compilation
docker-compose run tf

# You can also do:
# docker-compose run tf bash
# bash build.sh

  • Refer to tested build configurations⁠ to know which BAZEL_VERSION you need.
  • Be patient, the compilation can be long.
  • Enjoy your Python wheels in the wheels/ folder.
  • Don't forget to remove the container to free the space after the build: docker-compose rm --force.

⁠Builds

TensorflowPythonDistributionBazelCUDAcuDNNNCCLComment
v2.0.0-alpha03.6Ubuntu 18.100.2010.07.52.4seg fault error
v2.0.0-alpha03.6Ubuntu 18.100.20---OK
v2.0.0-alpha03.6Ubuntu 16.040.2010.07.52.4TODO
v2.0.0-alpha03.6Ubuntu 16.040.20---TODO
1.9.03.6Ubuntu 16.04--0.19-OK
1.9.03.6Ubuntu 16.049.00.197.1-OK
1.9.03.6Ubuntu 16.049.10.197.1-OK
1.9.03.6Ubuntu 16.049.20.197.1-OK
1.9.03.6CentOS 6.6--0.19-OK
1.9.03.6CentOS 6.69.00.197.1-OK
1.9.03.6CentOS 6.69.10.197.1-OK
1.9.03.6CentOS 6.69.20.197.1-OK

⁠Authors

⁠License

MIT License. See LICENSE⁠.

Tag summary

Content type

Image

Digest

Size

645.4 MB

Last updated

over 7 years ago

docker pull lmmdock/tensorflow-builder:ubuntu-18.04