Skip to content

sekarpdkt/docker-tensorflow-builder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 Dockerile, you should be able to compile TensorFlow on any Linux platform that run Docker.

Requirements

  • docker.
  • docker-compose.
  • nvidia-docker if compiling with CUDA support

Usage

  • Clone this repository:
git clone https://github.com/hadim/docker-tensorflow-builder.git

TensoFlow CPU

  • Edit the build.sh file as you wish. Here you can modify TensorFlow compilation options.
cd tensorflow/

# Build the Docker image
docker-compose build

# Set env variables
export TF_VERSION_GIT_TAG=v1.8.0

# Launch the Docker console
docker-compose run tf

# Start the compilation (this command is executed inside the Docker container)
bash build.sh

TensorFlow GPU

  • Download cuDNN and put it in a folder called cudnn/. (Yes, it's not possible to download cuDNN within a script and you need to login to the NVIDIA website to do it. And yes it's extreeemly boring!).

  • Set your default Docker runtime to nvidia-docker.

  • Edit the build.sh file as you wish. Here you can modify TensorFlow compilation options.

cd tensorflow-gpu/

# Build the Docker image
docker-compose build

# Set env variables
export TF_VERSION_GIT_TAG=v1.8.0
export CUDA_VERSION=9.1
export CUDNN_VERSION=7.1

# Launch the Docker console
docker-compose run tf

# Start the compilation (this command is executed inside the Docker container)
bash build.sh

  • 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

TF Python Processor Platform GC Flags CUDA cuDNN Link
1.8.0 3.6 Intel Core i7-7700HQ CPU - avx sse - - Link
1.8.0 3.6 Intel Core i7-7700HQ GPU GeForce GTX 1050 Ti Mobile avx sse 9.0 7 Link
1.8.0 3.6 Intel Core i7-7700HQ GPU GeForce GTX 1050 Ti Mobile avx sse 9.0 7.1 Link
1.8.0 3.6 Intel Core i7-7700HQ GPU GeForce GTX 1050 Ti Mobile avx sse 9.1 7.1 Link
1.8.0 3.6 Intel Core i7-7700HQ GPU GeForce GTX 1050 Ti Mobile avx sse 9.2 7.1 Link
1.8.0 3.6 Intel Core i7 960 CPU - sse - - Link
1.8.0 3.6 Intel Core i7 960 GPU GeForce GTX 1050 Ti sse 9.0 7 -
1.8.0 3.6 Intel Core i7 960 GPU GeForce GTX 1050 Ti sse 9.0 7.1 -
1.8.0 3.6 Intel Core i7 960 GPU GeForce GTX 1050 Ti sse 9.1 7.1 Link
1.8.0 3.6 Intel Core i7 960 GPU GeForce GTX 1050 Ti sse 9.2 7.1 -

Authors

License

MIT License. See LICENSE.

About

Docker images to compile TensorFlow yourself.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%