본문 바로가기

About my life/Development Studies

[Linux] 우분투에 cudnn 설치하는 방법: ubuntu20.04

728x90
반응형

그래픽 드라이버가 525 버전 이상이고, cuda 툴킷 12버전 이상을 설치하신 분들의 한해서 똑같이 따라하시면 되고 그 다른 분들은 아래 링크들을 따라가주시면 됩니다.

$ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/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-cuda-12

 

설치를 하시면 cudnn 의 버전을 확인해야겠죠 ? 

 

구글링에서 나온 버전 확인 방법들은 조금 옛날이라 잘 안되는 것 같더라구요. 그래서 직접 확인해봤습니다.

 

# 여기에 들어가보시면 cudnn 관련 파일들이 있을 겁니다.
$ cd /usr/include

# 확인해보고 싶으면
$ ls | grep cudnn

 

그러면 버전 관련 파일이 보이실 겁니다. 이 버전 파일을 열어보시면 정상적으로 다운로드된 cudnn 의 버전을 보실 수 있어요.

 

$ cat /usr/include/cudnn_version.h | grep CUDNN_MAJOR -A 2

 

그림 1. cudnn 버전

 

 

끝~~~

 

 

Reference 

[Linux] 우분투에 쿠다(CUDA) 설치하는 방법: ubuntu 20.04

 

[Linux] 우분투에 쿠다(CUDA) 설치하는 방법: ubuntu 20.04

먼저 아래 링크를 통해 본인의 환경을 비교해보시면 cuda 를 지원하는 환경인지 알 수 있습니다. https://docs.nvidia.com/cuda/cuda-installation-guide-linux/ CUDA Installation Guide for LinuxThe installation instructions for

wntdev.tistory.com

 

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

 

cuDNN 9.1.0 Downloads

 

developer.nvidia.com

 

위 링크를 가보시면 cudnn 설치지침이 나와있습니다.

 

만약에 cudnn 버전 호환이 되는지 확인하고 싶으신 분들은 아래 링크를 확인하시면 됩니다.

https://docs.nvidia.com/deeplearning/cudnn/latest/reference/support-matrix.html#support-matrix

 

Support Matrix — NVIDIA cuDNN v9.1.0 documentation

The following sections highlight the compatibility of NVIDIA cuDNN versions with the various supported NVIDIA CUDA Toolkit, CUDA driver, and NVIDIA hardware versions. Note For best performance, the recommended configuration for GPUs Volta or later is cuDNN

docs.nvidia.com

 

기본 다운로드 지침 문서는 아래에 있습니다.

https://docs.nvidia.com/deeplearning/cudnn/latest/installation/linux.html#installing-on-linux

 

Installing cuDNN on Linux — NVIDIA cuDNN v9.1.0 documentation

Note Before issuing the following commands, you must replace 9.x.y, $distro, and $architecture with your respective cuDNN version, OS distribution, and platform architecture. Where $distro is one of the following: ubuntu2004 ubuntu2204 debian11 debian12 An

docs.nvidia.com

 

 

728x90
반응형