NOTE: This is for the latest drivers, cuda and cudnn versions available as of 11/2018. Change the version numbers & URL for future releases
- Drop to a tty shell, stop the display manager (
sudo service lightdm stop
). Make sure no X server is running. - Uninstall & purge installed/previous nvidia drivers
sudo apt purge nvidia*
sudo apt autoremove
sudo dpkg -P cuda-*<TAB>
- Blacklist nouveau drivers if not already done
sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
- Update kernel initramfs:
sudo update-initramfs -u
- Install necessary packages:
sudo apt-get install dkms build-essential make
- Reboot
sudo reboot
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/410.73/NVIDIA-Linux-x86_64-410.73.run
sudo sh NVIDIA-Linux-x86_64-410.73.run --no-opengl-files
wget https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda_10.0.130_410.48_linux
sudo sh cuda_10.0.130_410.48_linux --no-opengl-libs
- Say:
no
when it asks for installing the driver since we have installed in the previous stepyes
when it asks for symlinking/usr/local/cuda
to/usr/local/cuda-10.0
- Default installa location (
/usr/local/cuda-10.0
) should be good
- Add the binaries & libraries to appropriate system paths:
echo 'export PATH=$PATH:/usr/local/cuda/bin' >> ${HOME}/.bashrc
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64' >> ${HOME}/.bashrc
wget https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/libcudnn7_7.4.1.5-1+cuda10.0_amd64.deb
sudo dpkg -i libcudnn7_7.4.1.5-1+cuda10.0_amd64.deb