Last active
June 14, 2019 06:25
-
-
Save vochicong/6f1b5f1e5210dcd2a4a550cd2b55ab3d to your computer and use it in GitHub Desktop.
Reset/reinstall nvidia driver, CUDA, nvidia docker for Ubuntu
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
# Stop everything maybe using GPU | |
sudo systemctl stop gdm.service | |
microk8s.disable gpu | |
sudo killall nvidia-persistenced | |
# Remove all nvidia-*, cuda, libcudnn | |
sudo apt-get purge docker-ce nvidia-* libnvidia-* cuda libcudnn7 | |
sudo apt autoremove | |
# Download latest NVIDIA driver from https://www.geforce.com/drivers | |
# Filename is something like ./NVIDIA-Linux-x86_64-410.93.run | |
# DON'T Install NVIDIA driver using this method | |
# sudo ./NVIDIA-Linux-x86_64-410.93.run | |
# Get cuda-repo from https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ubuntu-installation | |
sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb | |
# Install nvidia-driver from the repo | |
sudo apt-get install nvidia-driver-410 | |
# Reboot Ubuntu server | |
nvidia-smi | |
# Re-install https://github.com/NVIDIA/nvidia-docker | |
sudo apt-get install -y nvidia-docker2 | |
sudo systemctl restart docker | |
# sudo pkill -SIGHUP dockerd | |
docker run --runtime nvidia --rm -it nvidia/cuda nvidia-smi | |
sudo systemctl start gdm.service | |
sudo apt-get install -y cuda cuda-drivers | |
# Download cuDNN deb pkgs from https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html | |
# Install downloaed cuDNN debs | |
sudo dpkg -i libcudnn7_7.4.2.24-1+cuda10.0_amd64.deb | |
sudo dpkg -i libcudnn7-dev_7.4.2.24-1+cuda10.0_amd64.deb | |
sudo dpkg -i libcudnn7-doc_7.4.2.24-1+cuda10.0_amd64.deb | |
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 apt-get install -y cuda |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment