티스토리 뷰

Programming/docker

nvidia docker 설치하기

tech_curioso 2019. 4. 15. 13:21
728x90
반응형

https://github.com/NVIDIA/nvidia-docker

 

NVIDIA/nvidia-docker

Build and run Docker containers leveraging NVIDIA GPUs - NVIDIA/nvidia-docker

github.com

# If you have nvidia-docker 1.0 installed: we need to remove it and all existing GPU containers
docker volume ls -q -f driver=nvidia-docker | xargs -r -I{} -n1 docker ps -q -a -f volume={} | xargs -r docker rm -f
sudo apt-get purge -y nvidia-docker

# Add the package repositories
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \
  sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \
  sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update

# Install nvidia-docker2 and reload the Docker daemon configuration
sudo apt-get install -y nvidia-docker2
sudo pkill -SIGHUP dockerd

# Test nvidia-smi with the latest official CUDA image
docker run --runtime=nvidia --rm nvidia/cuda:9.0-base nvidia-smi

 

설치 명령 (sudo apt-get install -y nividia-docker2) 시 문제 

다음과 같은 에러가 나올 경우가 있다.

E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

 

이 경우 다음 URL을 참조하면 된다. 

https://www.hahwul.com/2016/08/debian-apt-get-could-not-get-lock.html

 

[DEBIAN] apt-get 사용 시 (잠금 파일을 얻을 수 업습니다)Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) Troub

[DEBIAN] apt-get 사용 시 (잠금 파일을 얻을 수 업습니다)Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) TroubleShooting

www.hahwul.com

 

728x90
반응형
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함