All the stuff to get CUDA 10.1 working with NVIDIA GPUs on Ubuntu 18.04. My notes.
sudo apt install nvidia-driver-430
- reboot
- run
nvidia-smi
. If it does not show your GPU, stop, fix. If this doesn't work, nothing else will (the rest of the stuff will compile, but won't work)