Skip to content

cuda_gpu_setup_wiki

Rodrigo Serra edited this page Nov 28, 2023 · 1 revision

1) install driver from Property!

in ubuntu go to:

Settings > Software and Updates > Additional Drivers > select: Using NVIDIA (proprietary) > Apply Changes

2) Cuda 8.0 installation

Download cuda

wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run

Install cuda (please follow the instructions below)

sudo sh cuda_8.0.61_375.26_linux-run

Do you accept the previously read EULA? accept/decline/quit: accept

Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 375.26? (y)es/(n)o/(q)uit: n (no, because we already have the propertary ones! which are more updated)

Install the CUDA 8.0 Toolkit? (y)es/(n)o/(q)uit: y

Enter Toolkit Location [ default is /usr/local/cuda-8.0 ]: (just press enter!)

Do you want to install a symbolic link at /usr/local/cuda? (y)es/(n)o/(q)uit: y

Install the CUDA 8.0 Samples? (y)es/(n)o/(q)uit: y

Enter CUDA Samples Location [ default is /home/ ]: (just press enter!)

3) Test

cd /home/<username>/NVIDIA_CUDA-8.0_Samples/1_Utilities/deviceQuery
make
./deviceQuery

should output: Detected 1 CUDA Capable device(s)

4) Link CUDA to libraries (add to .bashrc !)

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64"
export CUDA_HOME=/usr/local/cuda

5) Install CuDNN (v6.0)

Register here and download cuDNN v6.0 Library for Linux
tar -xvf <filename>
cd cuda
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*

Clone this wiki locally