Everything I installed after a “minimal” desktop installation of Ubuntu 18.04.
sudo apt install nvidia-driver-390 vim gcc-6 g++-6 sudo apt install python3-venv
That's everything needed for CUDA 9.0, so I downloaded the network-based deb, added the key and updated the cache following the instructions, then ran
# If you don't specify the version, you'll get something more recent, # which currently isn't compatible with the default tensorflow. sudo apt-get install cuda-9-0
After which - and with a reboot to enable the correct graphics driver, I verified the installation by running a simple tensorflow model:
python3 -m venv ~/newenvname