Deep Learning용 Workstation 구축 레코드 3(OS/드라이버/CUDA&cuDNN 설치)

당초 2에서 수로 설계를 공개할 계획이었으나 우선 Fedora25에서 GeForce GTX1080Ti를 사용하는 절차를 공개한다.
그건 22일 공개 예정입니다.

BIOS(UEFI) 설정


nVidia DisplayDriver를 설치할 때 Secure Boot을 사용하면 Microsoft 서명된 드라이버만 설치할 수 있으므로 SecuerBoot 설정을 변경합니다.
[UEFI] -> [Advanced Mode] -> [Boot] -> [Secure Boot]

OS Type

Default: Windows UEFI mode
Change: Other OS

운영 체제 설치


이번에 OS는 Docker에서 환경을 활용하기 위해 Fedora25Workstation을 선택했습니다.
다운로드는 여기
위의 UEFI 설정만 변경해도 설치에 어려움이 없습니다.
응, 설치는.
또한 다음은 특별한 설명이 없으면 루트 사용자가 실행합니다.
구현오류 응답 Data Link Layer Error LiveCD를 시작하는 동안 다음 오류가 항상 발생합니다. PCIe Bus Error severity=Corrected type=Data Link Layer id=0008 처리 방법 커널 옵션에 다음 내용을 추가합니다. pci=noaer sed -i -e '/GRUB_CMDLINE_LINUX/s/"*$/ pci=noaer"/g' /etc/default/grub grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg 컨트롤러가 오류로 채워지는 오류 출력을 방지하기 위한 임시 대응입니다. SCHED Error 커널을 업데이트하면 nouveau(nVidia에서 생산한 VGA의 커뮤니티 버전 드라이버)가 SCHED_ERROR을 뱉고 결국 동결한다. 처리 방법 커널 옵션에 다음 내용을 추가합니다. nouveau.modeset=0 sed -i -e '/GRUB_CMDLINE_LINUX/s/"*$/ nouveau\.modeset=0"/g' /etc/default/grub grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg 그러면 커뮤니티 드라이버 모드 설정이 비활성화됩니다. 기본 설정 SELinux 비활성화 vi /etc/selinux/config SELINUX=disabled su nopassword vi /etc/pam.d/su auth sufficient pam_wheel.so trust use_uid auth required pam_wheel.so use_uid 오류 응답상술한 "오류 응답"을 다시 시작합니다.
shutdown -r now
OS Update
dnf -y update
shutdown -r now

nVidia Video Driver 설치


대시보드 확인
lspci |grep -E "VGA"
05:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1)
06:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1)
09:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1)
0a:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1)
GeForce GTX1080Ti 4발이 인식되었는지 확인합니다.
선결 패키지 설치
dnf -y install kernel-devel kernel-headers gcc dkms acpid
(kernel-devel, gcc 설치 완료)
LINUX X64(AMD64/EM64T) DISPLAY DRIVER 다운로드
여기에서 시스템에 필요한 드라이버를 다운로드합니다.
다음은 NVIDIA-Linux-x86_64-381.22.run을 바탕으로 기사를 기재하다.적당히 다시 읽으세요.
chmod +x NVIDIA-Linux-x86_64-381.22.run
nouveau 비활성화
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
sed -i -e '/GRUB_CMDLINE_LINUX/s/"*$/ rd.driver\.blacklist=nouveau"/g'
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
dnf remove xorg-x11-drv-nouveau
initramfs 다시 만들기
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
dracut /boot/initramfs-$(uname -r).img $(uname -r)
Runlevel3(multi-user.target)로 전환
systemctl set-default multi-user.target
shutdown -r now
nVidia 순수 드라이버 설치 ./NVIDIA-Linux-x86_64-381.22.run 기존 드라이버 제거 확인(재설치 시) There appears to already be a driver installed on your system (version: 381.22). As part of installing this driver (version: 381.22), the existing driver will be uninstalled. Are you sure you want to continue? -> Yes DKMS 사용 확인 Would you like to register the kernel module sources with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later. -> Yes libglvnd 덮어쓰기 확인 An incomplete installation of libglvnd was found. Do you want to install a full copy of libglvnd? This will overwrite any existing libglvnd libraries. -> Install and overwrite existing files X 설정 덮어쓰기 확인 Would you like to run the nvidia-xconfig utility to automatically update your X configuration file so that the NVIDIA X driver will be used when you restart X? Any pre-existing X configuration file will be backed up. -> Yes 설치 완료 Your X configuration file has been successfully updated. Installation of the NVIDIA Accelerated Graphics Driver for Linux-x86_64 (version: 381.22) is now complete. Runlevel5(graphical.target)로 돌아가기 systemctl set-default graphical.target reboot CUDA 설치 다운로드여기에서 다운로드합니다.
플랫폼 선택

저장소 다운로드

설치


저장소 설치
rpm -ivh cuda-repo-fedora23-8.0.61-1.x86_64.rpm
CUDA 설치
dnf clean all
dnf -y install cuda
cat << 'EOS_' >> /etc/profile

# Add cuda for all user
PATH=$PATH:/usr/local/cuda/bin
export PATH
EOS_
shutdown -r now
CUDA 설치 확인
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61

cuDNN 설치


다운로드


여기 다운로드.
(nVidia에서 Developers Account를 만들어야 하므로 먼저 만들십시오.)

CUDA8.0 버전을 선택합니다.

cuDNN v6.0 라이브러리 for Linux를 클릭하고 다운로드합니다.

설치

tar zxvf cudnn-8.0-linux-x64-v6.0-tgz
mv cuda/include/* /usr/local/cuda/include/.
mv cuda/lib64/* /usr/local/cuda/lib64/.
ldconfig
이로써 OS 설치, 드라이버 설치, CUDA 설치가 모두 종료됩니다.

(추적) nVidia Video Driver 재설치


재부팅하면 Xorg를 시작할 수 없습니다.
이 경우 드라이버 재설치 를 실행하여 다시 시작하십시오.

좋은 웹페이지 즐겨찾기