Some Easy Steps For GPU Installation

Webtunix Blog

GPU stands for Graphic Processing Unit, it is a special kind of computer processor designed for handling graphics.

GPU Installation Steps:

For Ubuntu 16.04 users, we have to download some drivers.


Step 1: Downloading NVIDIA Driver
To remove unnecessary files and load fresh drivers write following commands.
sudo apt-get purge nvidia-*
sudo apt-get autoremove #[for removing temporary data]
sudo reboot #[It restarts the PC]

Step 2: Installing gcc 4.9 compiler
It will help us to avoid compile errors with Theano.
sudo apt-get install gcc-4.9 g++-4.9
sudo ln -s /usr/bin/gcc-4.9 /usr/bin/gcc -f
sudo ln -s /usr/bin/g++-4.9 /usr/bin/g++ -f

Step 3: Downloading CUDA 8.0 RC
Download runfile(local), when installing cuda 8.0 decline on installing NVIDIA drivers and then reboot.
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-367
sudo reboot

After then type command nvidia-smi to check whether NVIDIA drivers are installed or not. If it is properly installed you will get
following text.
Thu Aug 4 01:19:40 2016
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 367.35 Driver Version: 367.35 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 1070 Off | 0000:01:00.0 Off | N/A |
| 0% 40C P8 11W / 166W | 103MiB / 8112MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 4921 C ...y/anaconda3/envs/keras104_py27/bin/python 101MiB |
+-----------------------------------------------------------------------------+

Step 4: Export path
1. For exporting path of NVIDIA, check the file of CUDA named bsah.bash rc where you have to copy following lines.
export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
2. Then run $soure ~/.bashrc command and type nvcc -V which which you will be able to check GPU is configured or not.