Skip to content

Instantly share code, notes, and snippets.

@miroslavradojevic
Last active February 26, 2020 16:13
Show Gist options
  • Save miroslavradojevic/f1ae829bc2b07f2eea74fb14e02010d7 to your computer and use it in GitHub Desktop.
Save miroslavradojevic/f1ae829bc2b07f2eea74fb14e02010d7 to your computer and use it in GitHub Desktop.
Install Cuda 10.0 on Ubuntu 18.04 - compatible with Nvidia Isaac 2019.3
# Install Cuda 10.0 and nvidia-driver 440 - compatible with Isaac 2019.3
# Inspiration https://gist.github.com/bogdan-kulynych/f64eb148eeef9696c70d485a76e42c3a
# Calling default installer results with the installment of Cuda 10.2 and nvidia-driver 410 where both are not compatible with Nvidia Isaac
# https://developer.nvidia.com/cuda-10.0-download-archive?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1804&target_type=deblocal
# List Nvidia hardware (inspection only)
lspci | grep -i nvidia
# Check if there are cuda/nvidia drivers already installed
dpkg -l | grep cublas
dpkg -l | grep cuda
dpkg -l | grep nvidia
# Purge existing CUDA and nvidia drivers if they are installed
sudo apt --purge remove "cublas*" "cuda*"
sudo apt --purge remove "nvidia*"
# Install Cuda 10.0
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub && sudo apt update
sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt update
# Note: sudo apt install -y cuda would result in the intallation of another Cuda version, instead of 10.0
sudo apt-get install -y cuda-10-0
# Add directory /usr/local/cuda-10.0/bin to PATH, append following line to ~/.bashrc
# export PATH="/usr/local/cuda-10.0/bin${PATH:+:${PATH}}"
# Update bashrc
source ~/.bashrc
# Check Cuda version, should be 10.0
nvcc --version # works after source ~/.bashrc
# restart computer
sudo shutdown now
# sudo reboot now
###### After restart: ######
# Check nvidia driver version, should be v418+, this call results in v440
nvidia-smi
cat /proc/driver/nvidia/version
###### Info: ######
# Switch between Intel and Nvidia Graphics Card on Ubuntu using prime-select
# To check which card is being used
# Check which option was selected (should give nvidia)
prime-select query
# Info: check status of display devices and drivers - see which device is using which drivers
sudo lshw -c display
# Info: list Nvidia drivers (only informational.... installing cuda also installs nvidia-driver)
sudo ubuntu-drivers devices
# Info: list Nvidia/Cuda packages
dpkg -l | grep nvidia
dpkg -l | grep cublas
dpkg -l | grep cuda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment