Sunday, September 11, 2016

Install notes for Tensorflow

Installed CUDA 7.5 and CuDNN 5.1.3

Steps modified from

# Need Java 1.8 for bazel, on 14.04 this is a big mess - 14.10 and up openjdk-8 is in the repos
sudo dpkg --install --recursive --auto-deconfigure libjpeg62-turbo_1.3.1-12_amd64.deb
sudo apt-get update

sudo apt-get install debian-keyring debian-archive-keyring

sudo sh -c 'echo "deb jessie-backports main" >> /etc/apt/sources.list.d/debian-jessie-backports.list'

sudo sh -c 'echo "Package: *" >> /etc/apt/preferences.d/debian-jessie-backports'

sudo sh -c 'echo "Pin: release o=Debian,a=jessie-backports" >> /etc/apt/preferences.d/debian-jessie-backports'

sudo sh -c 'echo "Pin-Priority: -200" >> /etc/apt/preferences.d/debian-jessie-backports'
sudo apt-get -t jessie-backports install openjdk-8-jre openjdk-8-jre-headless openjdk-8-jdk-headless openjdk-8-jdk

# Set both to Java 8
sudo update-alternatives --config java
sudo update-alternatives --config javac

# Now for bazel
git clone
cd bazel
git checkout tags/0.2.1
sudo cp output/bazel /usr/bin

# Tensorflow
git clone --recurse-submodules
git checkout r0.10
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64"
export CUDA_HOME=/usr/local/cuda
bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
pip install wheel
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
pip install /tmp/tensorflow_pkg/tensorflow-0.10.0-cp27-none-linux_x86_64.whl

1 comment:

  1. Posts shared useful information and meaningful life, I must appreciate the way you have express your feelings through your blog!.
    Thank you for sharing!
    Yoob Games
    Kizi 2
    Yepi 100