1. Setting Up Docker (이미 도커가 설치 되어있는경우 이 과정을 Skip하자!!!!)
$ curl https://get.docker.com | sh \
&& sudo systemctl --now enable docker
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 18617 100 18617 0 0 371k 0 --:--:-- --:--:-- --:--:-- 371k
# Executing docker install script, commit: 93d2499759296ac1f9c510605fef85052a2c32be
Warning: the "docker" command appears to already exist on this system.
If you already have Docker installed, this script can cause trouble, which is
why we're displaying this warning and provide the opportunity to cancel the
installation.
If you installed the current Docker package using this script and are using it
again to update Docker, you can safely ignore this message.
You may press Ctrl+C now to abort this script.
+ sleep 20
2. Setting up NVIDIA Container Toolkit (안정적인 레포지토리와 GPG Key 셋업)
$ distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
&& curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - \
&& curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
3. apt 패키지 업데이트
$ sudo apt-get update
4. nvidia-docker 설치
$ sudo apt-get install -y nvidia-docker2
5. Docker 재실행
$ sudo systemctl restart docker
6. 테스트
$ sudo docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi
출처 : https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html
'Development > Docker' 카테고리의 다른 글
[Docker] Tensorflow GPU Container 띄우기 (7) | 2021.11.15 |
---|---|
[Docker] Image Build / Push / Pull (도커이미지 빌드 / 푸쉬 / 풀) (0) | 2021.09.30 |
[Docker] Ubuntu 20.04 도커 설치(Docker Install) (0) | 2021.09.30 |
[Docker] 실행중인 Container 에 진입하는 법 (0) | 2021.09.17 |
[Docker] 도커 이미지 삭제시 dependent child images로 인한 오류 해결 (4) | 2021.09.13 |
댓글