Skip to content

Instantly share code, notes, and snippets.

@terminalkitten
Last active July 19, 2023 09:34
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save terminalkitten/56a712bc7ca2d9e3d0a6e23a34137957 to your computer and use it in GitHub Desktop.
Save terminalkitten/56a712bc7ca2d9e3d0a6e23a34137957 to your computer and use it in GitHub Desktop.
Update driver + CUDA
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
@AidasLiaudanskas
Copy link

Thanks for saving me! Only the commands until the first reboot were necessary to update the drivers and CUDA version.

@mptich
Copy link

mptich commented Mar 13, 2021

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