Last active
December 4, 2018 16:25
-
-
Save ijleesw/2c98069afe55a46b8d099f441c5be308 to your computer and use it in GitHub Desktop.
Install CUDA 9.0, cuDNN 7.2.1 and CUDA Toolkit on Ubuntu 16.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
#!/bin/bash | |
cd ~/Downloads | |
# Remove CUDA | |
# sudo apt-get --purge remove 'cuda*' | |
# sudo apt-get autoremove --purge 'cuda*' | |
# sudo rm -rf /usr/local/cuda* | |
# Install CUDA 9.0 | |
wget -c https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb | |
sudo dpkg -i cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64.deb | |
sudo apt-key add /var/cuda-repo-9-0-local/7fa2af80.pub | |
sudo apt-get update | |
sudo apt-get install cuda | |
# Install Patch 1 | |
wget -c https://developer.nvidia.com/compute/cuda/9.0/Prod/patches/1/cuda-repo-ubuntu1604-9-0-local-cublas-performance-update_1.0-1_amd64-deb | |
sudo dpkg -i cuda-repo-ubuntu1604-9-0-local-cublas-performance-update_1.0-1_amd64-deb | |
sudo apt-get update | |
sudo apt-get upgrade cuda | |
# Install Patch 2 | |
wget -c https://developer.nvidia.com/compute/cuda/9.0/Prod/patches/2/cuda-repo-ubuntu1604-9-0-local-cublas-performance-update-2_1.0-1_amd64-deb | |
sudo dpkg -i cuda-repo-ubuntu1604-9-0-local-cublas-performance-update-2_1.0-1_amd64-deb | |
sudo apt-get update | |
sudo apt-get upgrade cuda | |
# Install cuDNN 7.2.1 | |
wget -c http://developer.download.nvidia.com/compute/redist/cudnn/v7.2.1/cudnn-9.0-linux-x64-v7.2.1.38.tgz | |
sudo tar -xzf cudnn-9.0-linux-x64-v7.2.1.38.tgz -C /usr/local | |
sudo ldconfig | |
# Install CUDA Toolkit | |
sudo apt install nvidia-cuda-toolkit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment