HOW TO : Install Cuda and Cudnn with GTX 1080.
1.INSTALL DRIVER FOR GTX 1080
The first time that you install the card in the computer and connect the HDMI to it the resolution will be the worst, so u need to install the drivers
sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt-get update sudo apt install nvidia-367 sudo reboot
Go settigns and now , you can configure your resolution.
2.INSTALL CUDA.
Go to his link CUDA LINK . in my case i download the version for UBUNTU 16.04 – runfile(local).
Go to the console and run :
sudo sh cuda_8.0.61_375.26_linux.run
Follow the instructions.
Remember that you already install the driver for nvidia so , u should write no.
3.INSTALL CUDNN
CUDNN is the library for neural network of nvidia, with this library you can train your own neural network with framework like caffe , tensor flow or darknet.
Register and Download CUDNN in the following link DOWNLOAD CUDNN
$ cd folder/extracted/contents $ sudo cp -P include/cudnn.h /usr/include $ sudo cp -P lib64/libcudnn* /usr/lib/x86_64-linux-gnu/ $ sudo chmod a+r /usr/lib/x86_64-linux-gnu/libcudnn*
Path environment variables
cd sudo nano ./bashrc
paste the following lines in the end of .bashrc
export PATH=$PATH:/usr/local/cuda/bin export LD_LIBRAY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64 export CUDA_HOME=/usr/local/cuda export LD_LIBRARY_PATH=/usr/local/cuda/lib if [ -z $LD_LIBRARY_PATH ]; then LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/lib else LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/lib fi export LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/cuda8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
save and close the terminal.
Now check the nvcc
nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2016 NVIDIA Corporation Built on Sun_Sep__4_22:14:01_CDT_2016 Cuda compilation tools, release 8.0, V8.0.44
Check the card
$ nvidia-smi +-----------------------------------------------------------------------------+ | NVIDIA-SMI 375.51 Driver Version: 375.51 | |-------------------------------+----------------------+----------------------+ | 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 1080 Off | 0000:01:00.0 On | N/A | | 27% 34C P8 7W / 180W | 448MiB / 8110MiB | 1% Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 983 G /usr/lib/xorg/Xorg 338MiB | | 0 1767 G compiz 105MiB | | 0 2311 G /usr/lib/firefox/firefox 2MiB | +-----------------------------------------------------------------------------+
refence links
http://developer.download.nvidia.com/compute/cuda/7.5/Prod/docs/sidebar/CUDA_Installation_Guide_Linux.pdf
https://askubuntu.com/questions/799184/how-can-i-install-cuda-on-ubuntu-16-04
https://askubuntu.com/questions/767269/how-can-i-install-cudnn-on-ubuntu-16-04