Installing CUDA driver in Ubuntu 18.04

Start by removing all currently installed NVIDIA drivers. This can be done by

apt-get purge nvidia*

Best way to get Nvidia driver and CUDA up and running is to download CUDA Toolkit (about 2.5GB) from Nvidia site and installing it. Execute the downloaded runfile by typing

sudo sh cuda_10.1.168_418.67_linux.run

This will install NVIDIA driver and CUDA.

Comments !