Upgrading to CUDA 8.0 on Ubuntu 16.04

      Comments Off on Upgrading to CUDA 8.0 on Ubuntu 16.04

Ubuntu 16.04 has a supported CUDA 7.5 package which one can install from the command line by just issuing:

sudo apt-get install nvidia-cuda-toolkit

If you already have CUDA 7.5 installed on your workstation using the default packages provided by Ubuntu, the easiest methods to upgrade is to do the following:
First, remove existing cuda-7.5 package:

$ sudo apt-get remove nvidia-cuda-toolkit

Secondly, download and install CUDA 8.0 from NVIDIA CUDA Downloads.
Just download the .deb(network) version. You can use the Ubuntu Software Center to install this .deb file which adds the PPA repos to your sources.list.

Thirdly, pull updated package info from respective repos:

$ sudo apt-get update

Finally, instead of issuing

 sudo apt-get install cuda 

, you should issue:

$ sudo apt-get install cuda-toolkit-8-0 

This will only install the toolkit and WILL NOT update the existing nvidia drivers. There is a risk of breaking the system if the included nvidia drivers are installed.
I got my shiny new CUDA 8.0 up and running in a matter of minutes.