Last active
June 28, 2018 21:58
-
-
Save cfperez/da15c73f356f81d9f005a32a95ddc633 to your computer and use it in GitHub Desktop.
CUDA 9.2 + cuDNN 7.1 install
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
#!/bin/bash | |
CUDNN_FILE="cudnn-9.2-linux-x64-v7.1.tgz" | |
[ -e $CUDNN_FILE ] || echo "Please download CUDNN 7.1 from https://developer.nvidia.com/rdp/cudnn-download" && exit 1 | |
sudo apt-get install linux-headers-$(uname -r) | |
# get CUDA 9.0 toolkit | |
PKG="cuda-repo-ubuntu1604_9.2.88-1_amd64.deb" | |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/$PKG | |
sudo dpkg -i $PKG | |
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub | |
sudo apt-get update | |
sudo apt-get -y install cuda | |
echo export PATH=/usr/local/cuda/bin${PATH:+:${PATH}} >> ~/.bashrc | |
echo export LD_LIBRARY_PATH=/usr/local/cuda/lib64\ | |
${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} >> ~/.bashrc | |
# install cuDNN 7 | |
tar -xzvf $CUDNN_FILE | |
sudo cp -P cuda/include/cudnn.h /usr/local/cuda/include | |
sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64 | |
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment