cuDNN  (NVIDIA CUDA® Deep Neural Network library ) 

 


cuDNN 설치 매뉴얼 참고
https://docs.nvidia.com/deeplearning/cudnn/latest/installation/linux.html

//-------------------------------------
< 그래픽 드라이버 설치 >
wsl의 경우 windows에 설치된 드라이버 사용

    - 드라이버, CUDA 정보 보기 명령
$  nvidia-smi

     - cuda toolkit 설치된 상태라면
$  nvcc --version


//-------------------------------------
< cuda toolkit 설치 >

https://developer.nvidia.com/cuda-downloads


https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=WSL-Ubuntu&target_version=2.0&target_type=deb_network

$ wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-keyring_1.1-1_all.deb
$ sudo dpkg -i cuda-keyring_1.1-1_all.deb
$ sudo apt-get update
$ sudo apt-get -y install cuda-toolkit-12-4


//-------------------------------------
< cuDNN 설치 >

https://developer.nvidia.com/cudnn-downloads


https://developer.nvidia.com/cudnn-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_network

$ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
$  sudo dpkg -i cuda-keyring_1.1-1_all.deb
$  sudo apt-get update
$  sudo apt-get -y install cudnn

$  sudo apt-get -y install cudnn-cuda-12


//-------------------------------------
     - 참고: 이전 버전 설치 방법
https://developer.nvidia.com/rdp/cudnn-archive
*.deb 파일 다운로드

$  sudo dpkg -i cudnn-local-repo-ubuntu2204-8.9.7.29_1.0-1_amd64.deb


//-------------------------------------
에러 처리

- 에러 메시지
Could not load library libcudnn_cnn_infer.so.8. Error


     - 해결방법 : libcudnn_cnn_infer.so.8 파일이 있는데도 에러가 난다면 경로 환경 설정
파일이 있는 폴더가 /nvidia/cudnn/lib 인 경우
$ export LD_LIBRARY_PATH=/nvidia/cudnn/lib:$LD_LIBRARY_PATH


//-------------------------------------
참고

https://medium.com/geekculture/install-cuda-and-cudnn-on-windows-linux-52d1501a8805#68ce

 

 

반응형
Posted by codens