Base Installer  
Installation Instructions:
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pinsudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600wget https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-ubuntu1804-10-1-local-10.1.243-418.87.00_1.0-1_amd64.debsudo dpkg -i cuda-repo-ubuntu1804-10-1-local-10.1.243-418.87.00_1.0-1_amd64.debsudo apt-key add /var/cuda-repo-10-1-local-10.1.243-418.87.00/7fa2af80.pubsudo apt-get updatesudo apt-get -y install cuda

 

설치 완료후 /usr/local/cuda/versions.txt 에서 쿠다 버전이 10.1로 되어있는지 확인.

 

5. 환경변수 설정

sudo vi /etc/profile.d/cuda.sh 입력후 i를 눌러 vi 편집모드로 들어가서 

export PATH=$PATH:/usr/local/cuda-10.1/bin

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-10.1/lib64

export CUDADIR=/usr/local/cuda-10.1

작성후 esc -> :wq를 눌러 저장후 종료.

 

재부팅.

 

6.  https://developer.nvidia.com/cudnn 에서 nvidia 로그인후

CUDA 10.1에 맞는 cuDNN 8.0.5버전 다운로드.

다운로드시 여러 파일형태중에 cuDNN Library for Linux (x86) 클릭.

 

 

7. 다운로드 폴더에서

tar -xzvf cudnn-10.1-linux-x64-v8.0.5.39.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*

sudo ldconfig

연속으로 입력.

 

 

8. ldconfig -N -v $(sed 's/:/ /' <<< $LD_LIBRARY_PATH) 2>/dev/null | grep libcudnn

입력후 cuDNN 설치 버전 확인.

 

 

 

참고링크 :

https://askubuntu.com/questions/1280885/ubuntu-18-04-1-cuda-10-1-installation-updates-nvidia-driver-to-455-which-is-n

https://teddylee777.github.io/linux/CUDA-%EC%9D%B4%EC%A0%84%EB%B2%84%EC%A0%84-%EC%82%AD%EC%A0%9C%ED%9B%84-%EC%9E%AC%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0

 

 

 how to change cuda version : https://stackoverflow.com/questions/45477133/how-to-change-cuda-version

 

+ Recent posts