Created
July 30, 2017 05:42
-
-
Save marando/261aff7578de9e3ddb07597a93b24005 to your computer and use it in GitHub Desktop.
Tensorflow GPU Install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/tensorflow/tensorflow | |
cd tensorflow | |
git checkout r1.0 | |
sudo apt-get install openjdk-8-jdk | |
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list | |
curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add - | |
sudo apt-get update && sudo apt-get install bazel | |
sudo apt-get upgrade bazel | |
sudo apt-get install python-numpy python-dev python-pip python-wheel | |
lspci | grep -i nvidia | |
sudo apt-get install linux-headers-$(uname -r) | |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb | |
sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb | |
sudo apt-get update | |
sudo apt-get install cuda | |
export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}} | |
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64 | |
$ cd folder/extracted/contents | |
$ sudo cp -P include/cudnn.h /usr/include | |
$ sudo cp -P lib64/libcudnn* /usr/lib/x86_64-linux-gnu/ | |
$ sudo chmod a+r /usr/lib/x86_64-linux-gnu/libcudnn* | |
sudo cp ../cuda/include/cudnn.h /usr/lib/x86_64-linux-gnu/include | |
sudo apt-get install libcupti-dev | |
$ cd tensorflow # cd to the top-level directory created | |
$ ./configure | |
Please specify the location of python. [Default is /usr/bin/python]: /usr/bin/python2.7 | |
Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native]: | |
Do you wish to use jemalloc as the malloc implementation? [Y/n] | |
jemalloc enabled | |
Do you wish to build TensorFlow with Google Cloud Platform support? [y/N] | |
No Google Cloud Platform support will be enabled for TensorFlow | |
Do you wish to build TensorFlow with Hadoop File System support? [y/N] | |
No Hadoop File System support will be enabled for TensorFlow | |
Do you wish to build TensorFlow with the XLA just-in-time compiler (experimental)? [y/N] | |
No XLA JIT support will be enabled for TensorFlow | |
Found possible Python library paths: | |
/usr/local/lib/python2.7/dist-packages | |
/usr/lib/python2.7/dist-packages | |
Please input the desired Python library path to use. Default is [/usr/local/lib/python2.7/dist-packages] | |
Using python library path: /usr/local/lib/python2.7/dist-packages | |
Do you wish to build TensorFlow with OpenCL support? [y/N] N | |
No OpenCL support will be enabled for TensorFlow | |
Do you wish to build TensorFlow with CUDA support? [y/N] Y | |
CUDA support will be enabled for TensorFlow | |
Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]: | |
Please specify the Cuda SDK version you want to use, e.g. 7.0. [Leave empty to use system default]: 8.0 | |
Please specify the location where CUDA 8.0 toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]: | |
Please specify the cuDNN version you want to use. [Leave empty to use system default]: 5 | |
Please specify the location where cuDNN 5 library is installed. Refer to README.md for more details. [Default is /usr/local/cuda]: | |
Please specify a list of comma-separated Cuda compute capabilities you want to build with. | |
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus. | |
Please note that each additional compute capability significantly increases your build time and binary size. | |
[Default is: "3.5,5.2"]: 3.0 | |
Setting up Cuda include | |
Setting up Cuda lib | |
Setting up Cuda bin | |
Setting up Cuda nvvm | |
Setting up CUPTI include | |
Setting up CUPTI lib64 | |
Configuration finished |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment