Installing NVIDIA Drivers and CUDA 8 Toolkit on Ubuntu 16.04

Step 1: Update and upgrade your system
sudo apt-get update && sudo apt-get upgrade -y

Step 2: Install Linux Headers (for installing aptitude “apt install aptitude”)
sudo aptitude -r install linux-headers-$(uname -r)

Step 3: sudo apt-get purge nvidia-*

Step 4: sudo add-apt-repository ppa:graphics-drivers/ppa

Step 5: sudo apt-get update

Step 6: sudo apt-get install nvidia-375

Step 7: Create a file and paste the following lines
sudo gedit /etc/modprobe.d/nvidia-installer-disable-nouveau.conf
(Paste Following)
———————————————————-
blacklist nouveau
options nouveau modeset=0
——————————————————–

For troubleshoot info:
https://askubuntu.com/questions/760934/graphics-issues-after-while-installing-ubuntu-16-04-16-10-with-nvidia-graphics

https://ubuntuforums.org/showthread.php?t=2353796

step 8: Download CUDA 8 Toolkit latest from https://developer.nvidia.com/cuda-toolkit

Click Download Now

CT1

Scroll below and Click Legacy Releases

CT2

Click on CUDA Toolkit 8.0 GA2

CT3

Select appropriate settings for your machine as shown and in installer type select deb (local)

CT4

Download both Base Installer and Patch 2 setup as shown

CT5

Step 9: Follow CUDA installation steps and install CUDA 8
——————————————————————-
1. sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb
2. sudo apt-get update
3. sudo apt-get install cuda
4. sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-cublas-performance-update_8.0.61-1_amd64.deb

Step 10: gedit libEGL.sh (Write down the following lines and make sure to change version 375.<66>)
or if you already have this script move to next step.
—————————————————————————————–
#!/bin/bash
sudo mv /usr/lib/nvidia-375/libEGL.so.1 /usr/lib/nvidia-375/libEGL.so.1.org
sudo mv /usr/lib32/nvidia-375/libEGL.so.1 /usr/lib32/nvidia-375/libEGL.so.1.org
sudo ln -s /usr/lib/nvidia-375/libEGL.so.375.66 /usr/lib/nvidia-375/libEGL.so.1
sudo ln -s /usr/lib32/nvidia-375/libEGL.so.375.66 /usr/lib32/nvidia-375/libEGL.so.1
—————————————————————————————–

Step 11: Run the above script
sudo chmod +x libEGL.sh
./libEGL.sh

Step 12: Post Installation step (path setting append in the file)
gedit ~/.bashrc
—————————————————————————————–
#CUDA home path
export CUDA_HOME=/usr/local/cuda

# CUDA Bin Path
export PATH=/usr/local/cuda-8.0/bin:$PATH

# CUDA Library Path
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH

# Use OpenCV and other custom-built libraries.
export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
—————————————————————————————–
——————————————————————-

Advertisements

Join the Discussion

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: