Install CUDA 10.0.130 on Ubuntu 18.04
- Install CUDA "dependencies"
There are a few dependencies that are good to install first since they don’t always get pulled along with a CUDA install from the “deb” file.
You will certainly need the build-tools and dkms,
sudo apt-get install build-essential dkms
sudo apt-get install freeglut3 freeglut3-dev libxi-dev libxmu-dev
sudo apt-get install linux-headers-$(uname -r)
sudo apt-get install gcc
Those packages will get the needed GL, GLU, Xi, Xmu libs and several other libraries that will be installed as dependencies from those.
Besides, you would better install Correct Kernel Headers.
CUDA 10 requires gcc-7
- Get the CUDA 10 “deb” file to set up the package repository
ubuntu18.04 ‘deb’ file download link
Installation Instructions:
`sudo dpkg -i cuda-repo-ubuntu1804-10-0-local-10.0.130-410.48_1.0-1_amd64.deb`
`sudo apt-key add /var/cuda-repo-<version>/7fa2af80.pub`
`sudo apt-get update`
`sudo apt-get install cuda`
- Setup your CUDA environment
The PATH variable needs to include /usr/local/cuda-10.0/bin To add this path to the PATH variable:
$ export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}
In addition, when using the runfile installation method, the LD_LIBRARY_PATH variable needs to contain /usr/local/cuda-10.0/lib64 on a 64-bit system, or /usr/local/ cuda-10.0/lib on a 32-bit system
To change the environment variables for 64-bit operating systems
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64\ ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
To change the environment variables for 32-bit operating systems:
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib\ ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
- Checking nvidia-smi or nvcc-V.
- Official installation introduction