Skip to content
Basic Deep Learning Machine bash and docker setup
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Basic Deep Learning Machine bash and docker setup for TensorFlow, PyTorch, and jupyter notebook


  • Ubuntu 16.04 installed (automated installation for newer version of Ubuntu will be coming soon)
  • Nvidia compatible GPU

Test Environmet:

  • Ubuntu 16.04 virtual-machine on Google Cloud Platform
  • Nvidia Tesla K80 GPU
  • Python 3.5

List of bash scripts:

# Automatically installs GPU driver, CUDA 9.0, cuDNN 7.0, and Python packages
# This is useful when you want to install other deep learning framework or a specific version on top of CUDA and cuDNN

# Automatically installs TensorFlow on top of CUDA and cuDNN (Python packages are included)

# Automatically builds TensorFlow from source (Python packages are included)


1. Clone/download this project on your machine (or remote virtual machine) 2. Run the following command in the command line to make any of the scripts executable

chmod +x [script-name].sh

3.Run the following commmand to execute the bash script


4. "" asks the user for TensorFlow configuration before the compilation starts

Automated Steps:

  • Install bazel to compile TensorFlow => in this step you will be asked to accept the terms and condition for JDK.

While installing Java to instal Bazel you will be promted to accept terms and conditions.


Hit enter to accept the License terms.


Select Yes and hit enter to accept Oracle binary code License terms.

  • Building TensorFlow from source. => in this step you will be asked to set different parameters in TensofFlow ("./configure") before starting the compilation.

Before TensorFlow compilation gets started, you will be prompted to set the configuration (add or remove of supporting of other frameworks). This could effect the compilation time.

  1. you will be asked to specify the location of Python on your machine.


on most machines:   /usr/bin/python or /usr/bin/python3.5 or etc
  1. then you will be asked to specifiy the path to python libraries.


default is: /usr/local/lib/python3.5/dist-packages
  1. After you specify that, you will be asked to choose for your TensorFlow to support or do not support many FrameWorks and Services.
    For more information visit TensorFlow installation Page here: TensorFlow

EXAMPLE: (If you hit enter you will choose the default values.)


  1. Make sure you choose the right version of CUDA and cuDNN.


  1. Then you will be asked to choose NCCL version. Since, V-2.2 is not installed. Choose V-1.3.5 or lookup how to install V-2.2. The latest version contains performance improvement on multiple GPU jobs.


  1. After you finish step-5 the compilation will start. It could take around few minutes to a couple of hours depending on how fast is your CPU, RAM, and hard drive.


  1. Then our bash script will install TensorFlow for Python3.

  2. If our bash script ran successfully, we should see the version of the TensorFlow installed on the screen.

Follow me @ Republic of AI:

Republic of AI website - Medium - YouTube - Twitter - Facebook - Instagram - LinkedIn

or my personal LinkedIn:

LinkedIn Profile

You can’t perform that action at this time.