Home [Docker]Nvidia Docker
Post
Cancel

[Docker]Nvidia Docker

Nvidia docker 설치

GPG Key 등록

1
2
3
4
5
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
      && curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
      && curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | \
            sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
            sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list

apt 관리

1
2
sudo apt-get update
sudo apt-get install -y nvidia-docker2

dry-run

1
docker run --rm --gpus all ubuntu:18.04 nvidia-smi
This post is licensed under CC BY 4.0 by the author.