Nvidia driver, cuda, cudnn

dev_halo·2022년 5월 6일
0
post-thumbnail

nvidia 드라이버 고급 검색

# 설치확인
nvidia-smi

cuda toolkit achive

# 설치확인
nvcc -V

# cuda 경로 설정
vi /etc/profile

# 열린 파일안 하단에 작성
export PATH=$PATH:/usr/local/cuda-11.3/bin 
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.3/lib64 
export CUDADIR=/usr/local/cuda-11.3

cudnn achive

# 설치
tar xvzf cudnn-11.3-linux-x64-v8.2.1.32.tgz
sudo cp cuda/include/cudnn* /usr/local/cuda-11.3/include 
sudo cp cuda/lib64/libcudnn* /usr/local/cuda-11.3/lib64 
sudo chmod a+r /usr/local/cuda-11.3/include/cudnn.h /usr/local/cuda-11.3/lib64/libcudnn*

# 하단을 실행하는 이유
# cudnn을 카피시 심볼릭 링크가 사라져서 다시 잡아주기 위함
sudo ln -sf /usr/local/cuda-11.3/targets/x86_64-linux/lib/libcudnn_adv_train.so.8.2.1.32 /usr/local/cuda-11.3/targets/x86_64-linux/lib/libcudnn_adv_train.so.8 

sudo ln -sf /usr/local/cuda-11.3/targets/x86_64-linux/lib/libcudnn_ops_infer.so.8.2.1.32 /usr/local/cuda-11.3/targets/x86_64-linux/lib/libcudnn_ops_infer.so.8 

sudo ln -sf /usr/local/cuda-11.3/targets/x86_64-linux/lib/libcudnn_cnn_train.so.8.2.1.32 /usr/local/cuda-11.3/targets/x86_64-linux/lib/libcudnn_cnn_train.so.8 

sudo ln -sf /usr/local/cuda-11.3/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8.2.1.32 /usr/local/cuda-11.3/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8 

sudo ln -sf /usr/local/cuda-11.3/targets/x86_64-linux/lib/libcudnn_ops_train.so.8.2.1.32 /usr/local/cuda-11.3/targets/x86_64-linux/lib/libcudnn_ops_train.so.8 

sudo ln -sf /usr/local/cuda-11.3/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8.2.1.32 /usr/local/cuda-11.3/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8 

sudo ln -sf /usr/local/cuda-11.3/targets/x86_64-linux/lib/libcudnn.so.8.2.1.32 /usr/local/cuda-11.3/targets/x86_64-linux/lib/libcudnn.so.8

# 설치확인 1
ldconfig -N -v $(sed 's/:/ /' <<< $LD_LIBRARY_PATH) 2>/dev/null | grep libcudnn

# 설치확인 2
sudo ldconfig
profile
일단 해보자 !

0개의 댓글