Last active
July 19, 2023 09:34
-
-
Save terminalkitten/56a712bc7ca2d9e3d0a6e23a34137957 to your computer and use it in GitHub Desktop.
Update driver + CUDA
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 add-apt-repository ppa:graphics-drivers/ppa | |
sudo apt-get update | |
sudo systemctl stop nvidia-persistenced | |
sudo apt remove -y --allow-change-held-packages libcuda1-384 nvidia-384 | |
sudo apt-get purge nvidia-* | |
sudo apt install nvidia-418 | |
sudo apt install libcuda1-418 | |
sudo apt install nvidia-cuda-toolkit | |
sudo reboot | |
curl -O https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_10.1.105-1_amd64.deb | |
sudo dpkg -i cuda-repo-ubuntu1604_10.1.105-1_amd64.deb | |
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 install cuda | |
sudo reboot | |
# To upgrade torch | |
# pip install torch==1.6.0+cu101 torchvision==0.7.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html |
Fantastic ! This was the only thing that worked for me when upgrading Nvidia drivers on Ubuntu 16.04.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for saving me! Only the commands until the first reboot were necessary to update the drivers and CUDA version.