Last active
July 28, 2016 14:58
-
-
Save vetional/3f75fa1a0a3923912d7b58819abef29f to your computer and use it in GitHub Desktop.
Setup tensorflow on ubuntu with GPU support
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
# Install build tools | |
sudo apt-get update | |
sudo apt-get install -y build-essential git python-pip curl software-properties-common libfreetype6-dev libxft-dev libncurses-dev libopenblas-dev gfortran python3-matplotlib libblas-dev liblapack-dev libatlas-base-dev python3-dev linux-headers-generic linux-image-extra-virtual unzip python3-numpy swig python3-pandas python-sklearn unzip python3-pip | |
# Install CUDA 7 | |
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1410/x86_64/cuda-repo-ubuntu1410_7.0-28_amd64.deb | |
# wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1504/x86_64/cuda-repo-ubuntu1504_7.5-18_amd64.deb | |
sudo dpkg -i cuda-repo-ubuntu1504_7.0-28_amd64.deb | |
sudo apt-get update | |
sudo apt-get install -y cuda | |
# Install cuDNN | |
# You get the CUDNN_URL by logging into your nivida account and downloading cuDNN | |
# https://developer.nvidia.com/rdp/cudnn-archive (cudnn 7.0) | |
export CUDNN_URL="https://www.dropbox.com/s/fmf67v0167sh0m4/cudnn-7.0-linux-x64-v4.0-prod.tar?dl=0" | |
wget $CUDNN_URL -O cudnn-7.0-linux-x64-v3.0-prod.tgz | |
tar -zxf cudnn-7.0-linux-x64-v3.0-prod.tgz && rm cudnn-7.0-linux-x64-v3.0-prod.tgz | |
sudo cp ./cuda/lib64/* /usr/local/cuda/lib64/ | |
sudo cp ./cuda/include/* /usr/local/cuda/include/ | |
# Reboot for CUDA | |
sudo reboot | |
sudo add-apt-repository ppa:webupd8team/java -y | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
mkdir github | |
pushd github | |
git clone https://github.com/bazelbuild/bazel.git | |
pushd bazel | |
./compile.sh | |
popd | |
git clone https://github.com/tensorflow/tensorflow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment