Skip to content

Installation of NVIDIA driver and CUDA 10 (on Ubuntu 18.04 LTS)

Mackenzie Mathis edited this page Jun 22, 2021 · 1 revision

Here are my (Mackenzie Mathis') tips for an easy installation. This is done on a fresh computer installation (Ubuntu 18.04 LTS)

install gcc:

sudo apt install gcc

then, download CUDA 10 from here: https://developer.nvidia.com/cuda-downloads and follow the instructions... ie:

wget http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run
sudo sh cuda_10.1.243_418.87.00_linux.run

with the exception that I also (afterwards):

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo ubuntu-drivers autoinstall

then reboot

Check gcc -version:

gcc --version

output:

gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

Then:

sudo apt install nvidia-cuda-toolkit gcc-7
nvcc --version

then you can check:

nvidia-smi

and you'll see driver version, CUDA version, status of graphics card(s).