Created
May 17, 2018 06:54
-
-
Save arjun-kava/8281cd6abec1a1e586aba015ef2b319d to your computer and use it in GitHub Desktop.
install cuda 9 and cudnn 7 ubuntu 18.04
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
#remove if already installed | |
sudo apt-get purge cuda | |
sudo apt-get purge libcudnn6 | |
sudo apt-get purge libcudnn6-dev | |
#install cuda and cudnn | |
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.0.176-1_amd64.deb | |
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/libcudnn7_7.0.5.15-1+cuda9.0_amd64.deb | |
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/libcudnn7-dev_7.0.5.15-1+cuda9.0_amd64.deb | |
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/libnccl2_2.1.4-1+cuda9.0_amd64.deb | |
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/libnccl-dev_2.1.4-1+cuda9.0_amd64.deb | |
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub | |
sudo dpkg -i cuda-repo-ubuntu1604_9.0.176-1_amd64.deb | |
sudo dpkg -i libcudnn7_7.0.5.15-1+cuda9.0_amd64.deb | |
sudo dpkg -i libcudnn7-dev_7.0.5.15-1+cuda9.0_amd64.deb | |
sudo dpkg -i libnccl2_2.1.4-1+cuda9.0_amd64.deb | |
sudo dpkg -i libnccl-dev_2.1.4-1+cuda9.0_amd64.deb | |
sudo apt-get update | |
sudo apt-get install -y cuda=9.0.176-1 | |
sudo apt-get install -y libcudnn7-dev | |
sudo apt-get install -y libnccl-dev | |
#remove not necessary files | |
sudo rm -rm cuda-repo-ubuntu1604_9.0.176-1_amd64.deb libcudnn7_7.0.5.15-1+cuda9.0_amd64.deb libcudnn7-dev_7.0.5.15-1+cuda9.0_amd64.deb libnccl2_2.1.4-1+cuda9.0_amd64.deb libnccl-dev_2.1.4-1+cuda9.0_amd64.deb | |
#export path | |
export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}} | |
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} | |
#reboot for loading | |
sudo reboot | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment