---
# System prepended metadata

title: CUDA INSTALL

---

# CUDA INSTALL

sudo apt-get purge nvidia*
sudo apt-get autoremove
sudo apt-get autoclean
sudo rm -rf /usr/local/cuda*
nvidia-smi
sudo reboot

sudo apt install nvidia-driver-440
sudo reboot

cd cuda_install
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb
sudo apt-key add /var/cuda-repo-10-2-local-10.2.89-440.33.01/7fa2af80.pub
sudo apt-get update

#### important !! must match the cuda version you want to install
#### fully remove and install, this makes cuda install into /usr/local/cuda-xx.x 
sudo apt-get remove cuda-toolkit-10-2
sudo apt autoremove
sudo apt-get install cuda-toolkit-10-2

nvidia-smi
sudo reboot

solve tensorflow cuda 11.0 not found
https://github.com/tensorflow/tensorflow/issues/45930
https://medium.com/@peterjussi/multicuda-multiple-versions-of-cuda-on-one-machine-4b6ccda6faae





https://blog.csdn.net/qq_15602569/article/details/109232265

https://jackfrisht.medium.com/install-nvidia-driver-via-ppa-in-ubuntu-18-04-fc9a8c4658b9


https://blog.csdn.net/tophuihui/article/details/108896615