Installation of NVIDIA driver 384
First we install a fresh Ubuntu 17.10 on a computer with an NVIDIA GPU and select "Install third-party software" during the process. Alternatively, we can add the graphics drivers repository manually:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
Then we install the most recent NVIDIA driver using apt:
sudo apt install nvidia-384 nvidia-384-dev
We verify the installation by running:
nvidia-smi
We should see an output which lists the NVIDIA 384 driver and our discrete NVIDIA GPU - similar to summarized table below:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.90 Driver Version: 384.90 |
| |
|-------------------------------+----------------------+----------------------+
| 0 Quadro M500M Off | 00000000:06:00.0 Off | N/A |
| N/A 48C P0 N/A / N/A | 943MiB / 2002MiB | 26% Default |
+-------------------------------+----------------------+----------------------+
Preparation for installing of CUDA 9 + SDK
We install a number of build/dev packages which we require later:
sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
We notice that the default gcc/g++ version on 17.10 is 7.2.0 (Ubuntu 7.2.0-8ubuntu3)
:
gcc -v
CUDA 9 requires gcc 6. Thus, we install it and set the corresponding sym-links:
sudo apt install gcc-6
sudo apt install g++-6
sudo ln -s /usr/bin/gcc-6 /usr/local/cuda/bin/gcc
sudo ln -s /usr/bin/g++-6 /usr/local/cuda/bin/g++
Note that the default gcc version is still 7.2
; can be checked by running gcc -v
again.
Installation of CUDA 9 + SDK
Download a version of CUDA 9, such as
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run
Make the downloaded file executable and run it using sudo:
chmod +x cuda_9.0.176_384.81_linux.run
sudo ./cuda_9.0.176_384.81_linux.run --override
We install CUDA with the following configurations:
You are attempting to install on an unsupported configuration. Do you wish to continue?
y
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 384.81?
n
Install the CUDA 9.0 Toolkit?
y
Enter Toolkit Location
[default location]
Do you want to install a symbolic link at /usr/local/cuda?
y
Install the CUDA 9.0 Samples?
y
Enter CUDA Samples Location
[default location]
Test the CUDA 9 installation using the SDK
Build your favorite CUDA sample and run it:
cd ~/NVIDIA_CUDA-9.0_Samples/5_Simulations/smokeParticles
make
../../bin/x86_64/linux/release/smokeParticles
Disclaimer: This guide is produced from memory and my .bash_histroy
. Hence it is possible that a step is missing. Please comment if this is the case.
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver.
Ranlspci | grep -i nvidia
says I have a GeForce GTX 760.mokutil --sb-state
shows SecureBoot disabled. Ransudo apt-get purge nvidia*
, ran your install command for 384, and randpkg -S nvidia-smi
nvidia-384: /usr/lib/nvidia-384/bin/nvidia-smi. Any suggestions? – Clark Kent Oct 23 '17 at 2:53modprobe: ERROR: ../libkmod/libkmod-module.c:832 kmod_module_insert_module() could not find module by name='nvidia_384'
– Clark Kent Oct 23 '17 at 3:00sudo ln -s /usr/bin/gcc-6 /usr/local/cuda-9.0/bin/gcc sudo ln -s /usr/bin/g++-6 /usr/local/cuda-9.0/bin/g++
orsudo ./cuda_9.0.176_384.81_linux-run --override
as author below recommends to install successfully without compiler conflict – yauheni_selivonchyk Nov 3 '17 at 4:22