Skip to content

Instantly share code, notes, and snippets.

@jedisct1
Created May 31, 2017 10:15
Show Gist options
  • Save jedisct1/13f0ee343ef7f2c867b8ec482e43567b to your computer and use it in GitHub Desktop.
Save jedisct1/13f0ee343ef7f2c867b8ec482e43567b to your computer and use it in GitHub Desktop.
Tensorflow 1.1 with CUDA 8.0 for GCE on Ubuntu 17.04
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 -
cd /tmp # the next part is specific to your setup
# Get it here: https://developer.nvidia.com/cudnn
gsutil cp gs://tn-devel-ds/ubuntu/libcudnn5* .
ls libcudnn*.deb | sort | xargs sudo dpkg -i
sudo apt update
sudo apt install libopenblas-dev liblapack-dev python3-pip python3-pandas python3-venv python3-werkzeug
nvidia-cuda-dev nvidia-cuda-toolkit libcupti8.0 libcudart8.0 libcupti-dev jupyter-notebook bazel silversearcher-ag gcc-4.9 g++-4.9 htop unzip most
sudo updatedb
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 15
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 15
sudo update-alternatives --install /usr/bin/cc1 cc1 /usr/lib/gcc/x86_64-linux-gnu/4.9/cc1 15
sudo update-alternatives --install /usr/bin/cc1plus cc1plus /usr/lib/gcc/x86_64-linux-gnu/4.9/cc1plus 15
sudo mkdir -p /usr/local/cuda
cd /usr/local/cuda
sudo mkdir -p bin lib64 nnvm extras/CUPTI/include extras/CUPTI/lib64
sudo ln -s /usr/include include
sudo ln -s /usr/bin/nvcc bin/nvcc
sudo ln -s /usr/lib/x86_64-linux-gnu/ nvvm
sudo ln -s /usr/include/cupti.h extras/CUPTI/include/cupti.h
sudo ln -s /usr/lib/x86_64-linux-gnu/libcudart_static.a lib64/libcudart_static.a
sudo ln -s /usr/lib/x86_64-linux-gnu/libcudart.so.8.0 lib64/libcudart.so.8.0
sudo ln -s /usr/lib/x86_64-linux-gnu/libcudart.so lib64/libcudart.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so.5 lib64/libcudnn.so.5
sudo ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so lib64/libcudnn.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libcuda.so lib64/libcuda.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libcublas.so.8.0 lib64/libcublas.so.8.0
sudo ln -s /usr/lib/x86_64-linux-gnu/libcublas.so lib64/libcublas.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libcufft.so lib64/libcufft.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libcufft.so.8.0 lib64/libcufft.so.8.0
sudo ln -s /usr/lib/x86_64-linux-gnu/libcurand.so.8.0 lib64/libcurand.so.8.0
sudo ln -s /usr/lib/x86_64-linux-gnu/libcusolver.so.8.0 libcusolver.so.8.0
sudo ln -s /usr/lib/x86_64-linux-gnu/libcupti.so.8.0 extras/CUPTI/lib64/libcupti.so.8.0
sudo ln -s /usr/lib/x86_64-linux-gnu/libcupti.so extras/CUPTI/lib64/libcupti.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment