A clean installation of Ubuntu 18.04.02 LTS was used.
This gist is an extension to the official docs, adding missing parts and instructions.
follow the pre-installation actions on: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#pre-installation-actions
install gcc: $ sudo apt-get install build-essential
we'll be using the distribution-specific packages (deb)
choose Linux > x86_64 > Ubuntu > 18.04 > deb (local)
verification
the link in the official docs redirect to md5 hashes of CUDA 9.2 files
use this link instead: https://developer.download.nvidia.com/compute/cuda/10.1/Prod/docs/sidebar/md5sum.txt
follow the instructions in the next section https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ubuntu-installation
you'll run into the following error:
$ sudo apt-get install cuda
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
cuda : Depends: cuda-10-1 (>= 10.1.105) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
to fix this, update your NVIDIA drivers to nvidia-418
use the following tutorial and use the method using PPA repository to install Nvidia Beta drivers: https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-18-04-bionic-beaver-linux
summary:
$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt update
$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.1/0000:02:00.0 ==
modalias : pci:v000010DEd00001004sv00001458sd00003604bc03sc00i00
vendor : NVIDIA Corporation
model : GK110 [GeForce GTX 780]
driver : nvidia-driver-410 - third-party free
driver : nvidia-driver-396 - third-party free
driver : nvidia-driver-415 - third-party free
driver : nvidia-driver-390 - distro non-free
driver : nvidia-340 - distro non-free
driver : nvidia-driver-418 - third-party free recommended
driver : xserver-xorg-video-nouveau - distro free builtin
nvidia-driver-418 is recommended, therefore execute:
$ sudo ubuntu-drivers autoinstall
after that $ sudo apt-get install cuda
will work
follow the post-installation steps: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions
add the following line to the end of ~/.bashrc
export PATH="/usr/local/cuda-10.1/bin:/usr/local/cuda-10.1/NsightCompute-2019.1:$PATH"
done
This line wasn't useful for me:
Because the installation process named the folder
/usr/local/cuda
and notcuda-10-1
. Could you maybe advise? Feel free to explain it to me like I'm 5.