git.png

Install CUDA & cuDNN:

If you want to use the GPU version of the TensorFlow you must have a cuda-enabled GPU.

  • To check if your GPU is CUDA-enabled, try to find its name in the long list of CUDA-enabled GPUs.
  • To verify you have a CUDA-capable GPU:
    • (for Windows) Open the command prompt (click start and write “cmd” on search bar) and type the following command:
    control /name Microsoft.DeviceManager 
    • (for Linux) Open terminal (Alt+Ctrl+T) and type:
    lspci | grep -i nvidia 

You need to install CUDA and cuDNN with following versions:

  • CUDA tooklit: 9.0
  • cuDNN: 7.0.5

Windows:

1. Download and install the CUDA toolkit 9.0 from https://developer.nvidia.com/cuda-90-download-archive. Choose the correct version of your windows and select local installer:

Alt text

Install the toolkit from downloaded .exe file.

2. Download the cuDNN v7.0.5 (CUDA for Deep Neural Networks) library from here. It will ask for setting up an account … (it is free) Download cuDNN v7.0.5 for CUDA 9.0.

Choose the correct version of your Windows. Download the file. Copy the files to “C:\Program FIles\NVIDIA GPU Computing Toolkit\CUDA\v9.0” in the corresponding folders:

Alt text

Linux:

1. Download and install the CUDA toolkit 9.0 from https://developer.nvidia.com/cuda-90-download-archive. Choose the correct version of your Linux and select runfile (local) local installer: Alt text

Open terminal (Alt+Ctrl+T) and type:

chmod +x cuda_9.0.176_384.81_linux.run
sudo ./cuda_9.0.176_384.81_linux.run --override 

*Note: Do not install the Graphics Driver.

You can verify the installation:

nvidia-smi 

Also you can check where your cuda installation path (we will call it as <cuda_path>) is using one of the commands:

which nvcc
ldconfig -p | grep cuda 

Your <cuda_path> will be /usr/... or /usr/local/cuda/ or /usr/local/cuda/cuda-9.0/. Locate it and add it to your .bashrc file:

export CUDA_ROOT=<cuda_path>/bin/
export LD_LIBRARY_PATH=<cuda_path>/lib64/ 

2. Download the cuDNN v7.0.5 (CUDA for Deep Neural Networks) library from here. It will ask for setting up an account … (it is free) Download cuDNN v7.0.5 for CUDA 9.0.

Choose cuDNN v7.0.5 Library for Linux. Go to the folder that you downloaded the file and open terminal (Alt+Ctrl+T):

tar -xvzf cudnn-9.0-linux-x64-v7.tgz
cd cuda/
sudo cp -P include/cudnn.h <cuda_path>/include
sudo cp -P lib64/libcudnn* <cuda_path>/lib64
sudo chmod a+r <cuda_path>/lib64/libcudnn* 

3. Install libcupti-dev:

sudo apt-get install libcupti-dev 

Thanks for reading! If you have any question or doubt, feel free to leave a comment. To download jupyter notebooks and fork in github please visit our github.

https://github.com/easy-tensorflow/easy-tensorflow

 

 

© 2018 Easy-TensorFlow team. All Rights Reserved.