Installing CUDNN for general usage without root access
Asked Answered
N

2

5

I use a server which has CUDA 7.5. But the server does not involve CUDNN.

Is it possible to install CUDNN, and set all the linkings with CUDA, without root access, for the usage of all applications on ubuntu 14.04?

I have implemented the solution on this page Installing cuDNN for Theano without root access, but it did not work for me. I have verified by building caffe; http://caffe.berkeleyvision.org/, and I have checked that using cmake. I have created a directory caffe/build and run cmake .. from there. If the configuration was correct I would see these lines:

-- Found cuDNN (include: /usr/local/cuda-7.0/include, library: /usr/local/cuda-7.0/lib64/libcudnn.so)

-- NVIDIA CUDA:
--   Target GPU(s)     :   Auto
--   GPU arch(s)       :   sm_30
--   cuDNN             :   Yes

But I saw

--   cuDNN             :   Not found

P.S. I also need to run: https://github.com/rsennrich/nematus

What is the best way to install CUDNN locally, and link with global CUDA in the server?

Needle answered 22/11, 2016 at 8:28 Comment(0)
D
9

it is possible to use CuDNN with a CUDA installed in a server, here is what I did to make it work. First, you just need to simply make a file in your local space:

Home/local

and make it contain include and lib folders(I guess most of you have had these local folders).

HOME/local/include
HOME/local/lib

Then download CuDNN and move the content from include and lib64 in the CuDNN folder into your local include and lib folders separately(which you just made)

At last, add these two environment paths to your .bashrc file

export CPATH=$CPATH:$HOME/local/include 
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/local/lib

It will work then.

BTW, if you meet a problem of 'out of memory' after successfully installing the CuDNN, enter this line in the terminal before running your code:

export CUDA_VISIBLE_DEVICES=0

to change the GPU device.

Disorientate answered 25/8, 2017 at 7:59 Comment(0)
E
3

I created a separate directory in my home for using the shared object and .h files for CuDNN. Then I added the path of this separate directory in the PATH and LD_LIBRARY_PATH variables in the bashrc. It works for me.

Elvyn answered 6/12, 2016 at 10:10 Comment(2)
Could you elaborate on how exactly you did that? How did you add the paths?Scholarship
I work in Linux. So the contents of my CUDA directory look in this manner - [r0605639@joy cuda]$ ls include/ lib64/ While the relevant entries in my .bashrc look like following : export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64 export LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64 export CPATH=$CPATH:/users/start2015/r0605639/cuDNN/copy:Elvyn

© 2022 - 2024 — McMap. All rights reserved.