cuda 9.1 install ubuntu 16.04 apt-get

By December 14, 2017Linux

Install CUDA 9.0 on Ubuntu 16.04 using apt-get – easiest method

First install and switch default gcc to gcc 7.1
[raw] sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt-get update && sudo apt-get install -y g++-7 gcc-7 && \
sudo update-alternatives –install /usr/bin/gcc gcc /usr/bin/gcc-7 60 –slave /usr/bin/g++ g++ /usr/bin/g++-7 && \
sudo update-alternatives –config gcc
[/raw]

Now setup
[raw] wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
sudo apt-get update
sudo apt-get install -y cuda-9-1
[/raw]

Reboot!

Leave a Reply