About

 

install tensorflow-gpu

Check Dependencies

$ python3 
$ pip3 —version

Install Dependencies

$ sudo -H pip3 install pip six numpy wheel setuptools mock future>=0.17.1
$ sudo -H pip3 install keras_applications==1.0.6 --no-deps
$ sudo -H pip3 install keras_preprocessing==1.0.5 --no-deps

Install Bazel

//Install Bazel dependencies

$ sudo apt-get install pkg-config zip g++ zlib1g-dev unzip python3

//Download the latest release of Bazel using tar or deb

$ sudo apt-get install openjdk-8-jdk

//Go to Github to download desired version of Bazel [default 0.26.1]

$ cd Downloads

$ sudo tar xvzf bazel-0.26.1.tar.gz

// or

$ sudo dpkg -i bazel_0.26.1-linux-x86_64.deb

$ sudo mv ~/Documents/bazel-0.26.1 /home/infinitelab/bazel/src
$ cd ~/Documents/bazel/src/bazel-0.26.1

$ sudo bazel build //src:bazel

$ export PATH="PATH=$PATH:$Home/bazel/src" >> ~/.bashrc

$ echo 'export PATH="$PATH:$HOME/bazel/src"' >> ~/.bashrc

Reload environment variables

source ~/.bashrc
sudo ldconfig

$ sudo dpkg -i nv-tensorrt-repo-ubuntu1604-cuda10.1-trt5.1.5.0-ga-20190427_1-1_amd64.deb

$ sudo apt-key add /var/nv-tensorrt-repo-cuda10.1-trt5.1.5.0-ga-20190427/7fa2af80.pub

$ sudo apt-get update

$ sudo apt-get install tensorrt

$ sudo apt-get install python3-libnvinfer-dev

$ sudo apt-get install uff-converter-tf

$ sudo apt-get update

$ dpkg -l | grep TensorRT

Install Tensorflow-GPU Experimental Build

git clone https://github.com/tensorflow/tensorflow

./configure

Please specify the location of python. [Default is /usr/bin/python]: /usr/bin/python3
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server 
                                                               using the command "bazel shutdown".
You have bazel 0.26.1. installed.
Please specify the location of python. [Default is /usr/bin/python]:/usr/bin/python3
Found possible Python library paths:
  /usr/local/lib/python3.5/dist-packages
  /usr/lib/python3/dist-packages
Please input the desired Python library path to use.  Default is [/usr/local/lib/python3.5/dist-packages]
Do you wish to build TensorFlow with XLA JIT support? [Y/n]:N
Do you wish to build TensorFlow with Apache Ignite support? [Y/n]: YDo you wish to build TensorFlow with XLA JIT support? [Y/n]: YDo you wish to build TensorFlow with OpenCL SYCL support? [y/N]: NDo you wish to build TensorFlow with ROCm support? [y/N]: NDo you wish to build TensorFlow with CUDA support? [y/N]: YPlease specify the CUDA SDK version you want to use. [Leave empty to default to CUDA 9.0]: 10.0
Please specify the location where CUDA 10.0 toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]: /usr/local/cuda-10.0
Please specify the cuDNN version you want to use. [Leave empty to default to cuDNN 7]: 7.3.1
Please specify the location where cuDNN 7 library is installed. Refer to README.md for more details. [Default is /usr/local/cuda-10.0]: /usr/local/cuda-10.0
Do you wish to build TensorFlow with TensorRT support? [y/N]: N
Please specify the NCCL version you want to use. If NCCL 2.2 is not installed, then you can use version 1.3 that can be fetched automatically but it may have worse performance with multiple GPUs. [Default is 2.2]: 2.3.5
Please note that each additional compute capability significantly increases your build time and binary size. [Default is: 7.0] 7.0
Do you want to use clang as CUDA compiler? [y/N]: N
Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]: /usr/bin/gcc
Do you wish to build TensorFlow with MPI support? [y/N]: N
Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native]: -march=native
Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]:N

// Now build Tensorflow using Bazel

$ bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package