sudo apt-get remove --purge nvidia*
sudo apt-get autoremove
apt search nvidia
sudo apt install nvidia-driver-xxx
sudo shutdown -r now
nvidia-smi
If it doesn't work, sometimes this is due to the secure boot option of your motherboard, disable it and test again.
ℹ️ Try to read the lastest NVIDIA CUDA Installation Guide by yourself.
Download cuda deb file from the nvidia website
sudo dpkg -i <cuda_file>.deb
sudo apt-get update
sudo apt-get install cuda-10.0
- If you miss the MOK key importing after rebooting , which may cause nvidia-smi not working. reference
sudo mokutil --import /var/lib/shim-signed/mok/MOK.der
- Set the password
- Reboot and import the key with the password
- Or just go into BIOS and disable secure boot
export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export CUDA_HOME=/usr/local/cuda-10.0
nvcc --version
If you want to run nvcc --version
all the time, add them to ~/.bashrc
file.
. ~/.bashrc
cuda-install-samples-10.0.sh ~/.
cd ~/NVIDIA_CUDA-10.0_Samples/1_Utilities/deviceQuery
make
shutdown -r now
cd ~/NVIDIA_CUDA-10.0_Samples/1_Utilities/deviceQuery
./deviceQuery
ℹ️ Try to read the lastest NVIDIA cuDNN Installation Guide by yourself.
Download cudnn deb file from the nvidia website
tar -zxvf cudnn-10.0-linux-x64-v7.6.4.tgz
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
sudo dpkg -i libcudnn7_7.6.4.38-1+cuda10.0_amd64.deb