Last active
January 11, 2021 10:03
-
-
Save hmen97/f14b861c96404a27f8c62016ed6c1d32 to your computer and use it in GitHub Desktop.
CUDA setup for Nvidia GPUs (Process can also be used depending on your configuration)
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
Before you check the download, use these links to check the compatibility: | |
For tensorflow and CUDA compatibility: | |
https://www.tensorflow.org/install/source#gpu | |
For CUDA and Nvidia driver compatibility: | |
https://docs.nvidia.com/deploy/cuda-compatibility/index.html | |
For cuDNN compatibility: | |
https://docs.nvidia.com/deeplearning/sdk/cudnn-support-matrix/index.html | |
https://www.tensorflow.org/install/source#linux | |
CUDA Download: | |
https://developer.nvidia.com/cuda-downloads | |
If you want legacy releases then click on that | |
Choose your target system click on deb(local) | |
Download and follow the base installer insrtuctions | |
Nvidia Driver download: | |
https://www.nvidia.com/Download/index.aspx?lang=en-us | |
search | |
Download | |
Use the additional information for download instructions | |
""" | |
'dpkg -i nvidia-diag-driver-local-repo-ubuntu1604-384.183_1.0-1_amd64.deb’ | |
apt-get update | |
apt-get install cuda-drivers | |
reboot | |
""" | |
run nvidia-smi //to make sure that the driver and CUDA is installed properly | |
cuDNN Download: | |
https://developer.nvidia.com/rdp/cudnn-archive | |
Download the runtime cuDNN file based on your OS and CUDA version | |
sudo dpkg -i {cuDNN.debfile} | |
sudo dpkg -i {cuDNN-dev.debfile} | |
sudo dpkg -i {cuDNN-doc.debfile} | |
// you should see "Test passed" | |
nvcc -V | |
or | |
cp -r /usr/src/cudnn_samples_v7/ ~ | |
cd ~/cudnn_samples_v7/mnistCUDNN | |
make clean && make | |
./mnistCUDNN | |
Congradulations | |
To completely remove CUDA, NVIDIA, cuDNN: | |
//remove files | |
sudo apt remove nvidia* | |
sudo apt remove cuda* | |
sudo apt remove libcudnn* | |
//removes config files from apt | |
dpkg -l | grep cuda- | awk '{print $2}' | xargs -n1 sudo dpkg --purge | |
sudo dpkg -P $(dpkg -l | grep cuda | awk '{print $2}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment