2019/01/20

ubuntu 18.04 cuda9.2 install

nvidia 확인
lspci | grep NVIDIA

nvidia 드라이버 설치
https://nautilusleenssi.blogspot.com/2019/01/ubuntu-1804-drvier-nvidia.html

현대 드라이버 설치 버전 nvidia-390 사용.
sudo apt-get install gcc-6 g++-6 linux-headers-$(uname -r) -y

CUDA Toolkit 설치
다운로드
wget -O cuda_9.2.88_396.26_linux.run -c https://developer.nvidia.com/compute/cuda/9.2/Prod/local_installers/cuda_9.2.88_396.26_linux

실행
sudo chmod +x cuda_9.2.88_396.26_linux.run
sudo ./cuda_9.2.88_396.26_linux.run --verbose --silent --toolkit --override

설치 성공 메시지 확인
===========
= Summary =
===========

Toolkit: Installed in /usr/local/cuda-9.2
Samples: Not Selected

Please make sure that
 - PATH includes /usr/local/cuda-9.2/bin
 - LD_LIBRARY_PATH includes /usr/local/cuda-9.2/lib64, or, add /usr/local/cuda-9.2/lib64 to /etc/ld.so.conf and run ldconfig as root

bashrc 설정
vi ~/.bashrc
export PATH="$PATH:/usr/local/cuda-9.2/bin"

동적 라이브러리 경로 지정
sudo echo "/usr/local/cuda-9.2/lib64" >> /etc/ld.so.conf
또는
vi /etc/ld.so.conf.d/cuda9-2.conf
/usr/local/cuda-9.2/lib64
sudo ldconfig

NVIDIA 패치 적용
wget https://developer.nvidia.com/compute/cuda/9.2/Prod/patches/1/cuda_9.2.88.1_linux
sudo chmod +x cuda_9.2.88.1_linux
sudo ./cuda_9.2.88.1_linux --silent --accept-eula

패치 설정 메시지 확인
Welcome to the CUDA Patcher.
Installation complete!
Installation directory: /usr/local/cuda-9.2

gcc 버전 설정
sudo ln -s /usr/bin/gcc-6 /usr/local/cuda-9.2/bin/gcc
sudo ln -s /usr/bin/g++-6 /usr/local/cuda-9.2/bin/g++

댓글 없음:

댓글 쓰기