이슈
집에서 ubuntu 에 nvidia, cuda를 설치해서 사용하고 있는데 reboot 할때마다 드라이버를 못 잡는다.
NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
매번 삭제하고 다시 깔아줘야 한다.
해결
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# nvidia 관련 전부 삭제
sudo apt --purge remove *nvidia*
sudo apt autoremove
sudo apt autoclean
# 특정버전 run 파일 설치 할 때
sh NVIDIA-Linux-x86_64-460.91.03.run
# apt로 설치할 때
ubuntu-drivers devices
sudo apt install nvidia-driver-470
# cuda는 사실 폴더 삭제만 해줘도 된다.
# cudnn 다시 카피하기 귀찮아서 /usr/local/cuda-11.2 폴더 삭제 안하고 그냥 설치할때도 있음
sh cuda_11.2.2_460.32.03_linux.run
참고
- https://velog.io/@jeongm/Ubuntu-18.04-nvidia-%EC%82%AD%EC%A0%9C-%EB%B0%8F-%EC%9E%AC%EC%84%A4%EC%B9%98