Last active
November 12, 2015 21:45
-
-
Save obskein/d223813ca53e95178c39 to your computer and use it in GitHub Desktop.
Build tensorflow from source
This file contains 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
#Install Cuda V7.0 (!!!) and Cudnn 6.5 | |
# https://developer.nvidia.com/cuda-toolkit-70 | |
wget http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/rpmdeb/cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb | |
sudo dpkg -i | |
sudo apt-get update | |
sudo apt-get install cuda=7.0-28 | |
wget https://s3-eu-west-1.amazonaws.com/christopherbourez/public/cudnn-6.5-linux-x64-v2.tgz | |
tar cudnn-6.5-linux-x64-v2.tgz | |
rm xvzf cudnn-6.5-linux-x64-v2.tgz | |
sudo cp cudnn-6.5-linux-x64-v2/cudnn.h /usr/local/cuda-7.5/include/ | |
sudo cp cudnn-6.5-linux-x64-v2/libcudnn* /usr/local/cuda-7.5/lib64/ | |
git clone --recurse-submodules https://github.com/tensorflow/tensorflow | |
sudo apt-get install python-numpy swig python-dev | |
cd tensorflow | |
./configure | |
# get and install bazel (http://bazel.io/docs/install.html) | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
sudo apt-get install oracle-java8-set-default | |
sudo apt-get install pkg-config zip g++ zlib1g-dev unzip | |
wget https://github.com/bazelbuild/bazel/releases/download/0.1.1/bazel-0.1.1-installer-linux-x86_64.sh | |
chmod +x bazel-0.1.1-installer-linux-x86_64.sh | |
export JAVA_HOME=/usr/lib/jvm/java-8-oracle | |
./bazel-0.1.1-installer-linux-x86_64.sh --user | |
# add /home/<username>/bin to $PATH | |
bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer | |
https://github.com/bazelbuild/bazel/releases/tag/0.1.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had to create a broken cuda.config before tensorflow/configure would work. For completedness, I put
In there before it replaced it with something useful.