-
[CS] ubuntu 20.04.6 [LTS]에 NVIDIA - DRIVER 설치et al/Docker&git 2023. 10. 19. 22:18
0. 부팅이 안 되는 에러상황 발생시
ubuntu-drivers devices # 설치 가능한 드라이버 확인 sudo ubuntu-drivers autoinstall # 드라이버 자동 설치
위와 같이 자동업데이트를 통해 그래픽카드 드라이버를 설치했는데, 재부팅하니 검정 화면이 나를 반겼다. 그래픽카드와 드라이버가 맞지 않아서 발생하는 문제였고, 안전모드로 진입하여, 드라이버를 삭제하니 다시 정상적으로 부팅할 수 있었다. 그 해결과정이 꽤나 오래 걸렸는데, 빛이 되어준 블로그 링크를 첨부한다.
1. 드라이버 설치 전 준비작업
1-1 시작 전 업데이트
sudo apt-get update sudo apt-get upgrade
출처 : https://blog.outsider.ne.kr/346
1-2 현재 설치된 그래픽 카드 확인
lspci | grep VGA lspci | grep -i VGA # 둘 중 하나의 코드로 확인하면 된다.
최신 그래픽 카드에 경우 이름이 업데이트가 안 되어 있어서 아래와 같이 nvidia 제품인 것만 확인할 수도 있다.
07:00.0 VGA compatible controller: NVIDIA Corporation Device 2805 (rev a1)
이름을 업데이트해주자.
sudo update-pciids
업데이트 후에 lspci | grep VGA를 입력해주면 아래와 같이 이름이 잘 나오는 것을 볼 수 있다.
07:00.0 VGA compatible controller: NVIDIA Corporation AD106 [GeForce RTX 4060 Ti 16GB] (rev a1)
출처 : https://davi06000.tistory.com/21
2. GUI - 업데이트 방법
유튜브를 참고해서, command가 아닌 우분투 드라이버 기본앱을 통해 그래픽 카드 드라이버를 설치하였다.
additional drivers를 검색해서 찾아 들어간다.
아래와 같이 여러가지 그래픽이 보이는데, open과 server라고 적혀있는 것이 아닌 아래 선택된 항목을 설치해주고 재부팅한다.
출처 : https://youtu.be/OFWKevbjDPU?si=MRTZj-Xb1-gVWqUl
nvidia driver version - 535.113.01
3. 설치 확인
nvidia-smi
드라이버가 잘 설치되었다면 위 명령어를 입력시 아래와 같이 그래픽카드 정보가 출력된다.
정보에 나오는 CUDA Version은 해당 드라이버 버전에서 가장 호환이 잘 되는 cuda버전을 알려주는 것이다.
출처 :https://ingu627.github.io/tips/install_cuda_linux/
'et al > Docker&git' 카테고리의 다른 글
[Docker] pytorch 딥러닝 환경 구축하기 (0) 2023.10.22 [CS] 4060ti 16GB - cuda & pytorch & tensorflow & cuDNN 호환 버전 확인 (0) 2023.10.19 [Docker] 도커(wsl)에서 미니콘다(miniconda)와 vscode 연결하기 (0) 2023.06.24 [Docker] 도커 바인드 마운트(bind mount) 하는 방법 (0) 2023.06.24 [Docker] 도커에 우분투(ubuntu) 설치하는 법 (0) 2023.06.19