1.1.下载:
libcudnn7-doc_7.4.2.24-1+cuda10.0_amd64.deb
cudnn-10.0-linux-x64-v7.5.0.56.tgz
1.2 .解压cudnn-10.0-linux-x64-v7.5.0.56.tgz:
tar -xzvf cudnn-10.0-linux-x64-v7.5.0.56.tgz
执行:
$ sudo cp cuda/include/cudnn.h /usr/local/cuda/include
$ sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
$ sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
1.3.
dpkg -i libcudnn7-doc_7.4.2.24-1+cuda10.0_amd64.deb
1.4.验证:
cp -r /usr/src/cudnn_samples_v7/ $HOME
cd $HOME/cudnn_samples_v7/mnistCUDNN
make clean && make
./mnistCUDNN
If cuDNN is properly installed and running on your Linux system, you will see a message similar to the following:
Test passed!
参考:https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#network-installation
cuda加环境变量:
sudo vim ~/.bashrc
加入:
export PATH="/usr/local/cuda-10.0/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-10.0/lib64:$LD_LIBRARY_PATH"
export PATH="/usr/local/cuda/bin:$PATH"
source ~/.bashrc
————————————————