Skip to content
Basic Deep Learning Machine bash and docker setup
Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images
.gitignore
LICENSE
README.md
basic_deeplearning_machine.sh
cuda_with_compiled_tensorflow.sh
cuda_with_tensorflow_building_from_source.sh

README.md

basic_deeplearning_machine

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

prerequisites:

  • 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 
basic_deeplearning_machine.sh

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

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

Instructions:

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

./[script-name].sh

4. "cuda_with_tensorflow_building_from_source.sh" 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.

java1

Hit enter to accept the License terms.

java2

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.

tf1

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.

ft2

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

tf3

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

tf4

  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.

tf5

  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.

tf6

  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.