Last active
September 23, 2019 05:27
-
-
Save mirfan899/802128250244383d8476b76c95871640 to your computer and use it in GitHub Desktop.
Install cuda 9 and cudnn 7 directly from nvidia
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
sudo apt-get purge cuda | |
sudo apt-get purge libcudnn6 | |
sudo apt-get purge libcudnn6-dev | |
# resources for nvidia deb package. | |
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 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 cuda=9.0.176-1 | |
sudo apt-get install libcudnn7-dev | |
sudo apt-get install libnccl-dev | |
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}} | |
source ~/.bashrc | |
cat /usr/local/cuda/version.txt | |
nvcc --version | |
# check cudnn version if installed by zip file | |
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2 | |
# check cudnn version if installed by deb package | |
cat /usr/include/cudnn.h | grep CUDNN_MAJOR -A 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment