At the moment there is a big hype about Deep learning. More and more frameworks for neural networks are in the making and getting improved every day. A lot of pretty cool stuff can be done with Neural Networks. GPU computing is a key factor for the success of neural networks. In this tutorial we show you how to set up your Computer for the beautiful world of GPU computing. Therefore we show you how to install CUDA (Compute Unified Device Architecture) and cuDNN (CUDA Deep Neural Network library). This Tutorial is designed for Ubuntu.
Step 1: Check your Hardware
The base for GPU computing is a solid Hardware setup. Not all GPU’s are able to run with CUDA. To find out your hardware configuration run the following command in the terminal.
Step 2: Install the Nvidia driver
To install the Nvidia driver go into the System Settings, then to Software and Updates and navigate to the tab Additional Drivers. Choose the current Nvidia binary Driver (proprietary, tested) and apply the changes. Reboot the computer and check if the installation worked with the following command.
The Output should look like this:
If you experience Tearing (horizontal stripes while watching videos) check out our guide about fixing screen tearing.
Step 3: Download and install CUDA
Download the CUDA .run file here and run it.
accept/decline/quit: accept
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 367.48?
(y)es/(n)o/(q)uit: n
Install the CUDA 8.0 Toolkit?
(y)es/(n)o/(q)uit: y
Enter Toolkit Location
[ default is /usr/local/cuda-8.0 ]:
Do you want to install a symbolic link at /usr/local/cuda?
(y)es/(n)o/(q)uit: n
Install the CUDA 8.0 Samples?
(y)es/(n)o/(q)uit: n
Installing the CUDA Toolkit in /usr/local/cuda-8.0 …
===========
= Summary =
===========
Driver: Not Selected
Toolkit: Installed in /usr/local/cuda-8.0
Samples: Not Selected
Please make sure that
– PATH includes /usr/local/cuda-8.0/bin
– LD_LIBRARY_PATH includes /usr/local/cuda-8.0/lib64, or, add /usr/local/cuda-8.0/lib64 to /etc/ld.so.conf and run ldconfig as root
To uninstall the CUDA Toolkit, run the uninstall script in /usr/local/cuda-8.0/bin
Please see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-8.0/doc/pdf for detailed information on setting up CUDA.
***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 361.00 is required for CUDA 8.0 functionality to work.
To install the driver using this installer, run the following command, replacing
sudo
Logfile is /tmp/cuda_install_30418.log
To finish the installation add following in your .bashrc or .zshrc file.
export LD_LIBRARY_PATH=/usr/local/
For <cuda-yourcudaversion> choose your cuda version e.g. cuda-8.0.
Now source the .bashrc or .zshrc file.
Check the installation with
Step 4: Install cuDNN
First download cuDNN. You have to register to get access to the Download. Choose the library for linux. After downloading the file extract the content.
Usually the Cuda Folder ist located in /usr/local/.
That’s it. Hopefully this tutorial answered your questions. If you have any questions just leave a comment. Happy GPU computing.