0% found this document useful (0 votes)
30 views24 pages

Dockers 1 Pyimage

This article discusses how to get started with Docker for machine learning. It covers installing Docker and configuring it to work with NVIDIA GPUs. It then demonstrates running a Docker container with GPU support to check that setup is working properly.

Uploaded by

Bimal Chand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views24 pages

Dockers 1 Pyimage

This article discusses how to get started with Docker for machine learning. It covers installing Docker and configuring it to work with NVIDIA GPUs. It then demonstrates running a Docker container with GPU support to check that setup is working properly.

Uploaded by

Bimal Chand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

1 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

2 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

3 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

4 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

5 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

6 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

7 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

8 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

Getting Started with Docker for Machine Learning


1. ```bash
2. curl https://get.docker.com | sh \
3. && sudo systemctl --now enable docker
4. ```

gnome-terminal

9 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

Getting Started with Docker for Machine Learning


1. ```bash
2. >> sudo dnf -y install dnf-plugins-core
3. >> sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-
ce.repo
4. ```

Getting Started with Docker for Machine Learning


1. ```bash
2. >> sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-
compose-plugin
3. ```

Getting Started with Docker for Machine Learning


1. ```bash

10 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

Getting Started with Docker for Machine Learning


1. ```bash
2. systemctl --user start docker-desktop
3. ```

Getting Started with Docker for Machine Learning


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

11 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

Getting Started with Docker for Machine Learning


1. ```bash
2. sudo apt-get update
3. ```

nvidia-container-toolkit

Getting Started with Docker for Machine Learning


1. ```bash
2. sudo apt-get install -y nvidia-container-toolkit-base nvidia-container-toolkit
3. ```

nvidia-container-toolkit

Getting Started with Docker for Machine Learning


1. ```bash
2. sudo nvidia-ctk runtime configure --runtime=docker
3. ```

Getting Started with Docker for Machine Learning


1. ```bash
2. sudo systemctl restart docker
3. ```

Getting Started with Docker for Machine Learning


1. ```bash
2. sudo docker run --rm --runtime=nvidia --gpus all nvidia/cuda:11.6.2-base-ubuntu20.04 nvidia-
smi
3. ```

12 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

nvidia-smi

13 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

★★★★★

14 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

15 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

16 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

author = {Suvaditya Mukherjee},


title = {Getting Started with Docker for Machine Learning},
booktitle = {PyImageSearch},
editor = {Puneet Chugh and Aritra Roy Gosthipaty and Susan Huot and Kseniia
Kidriavsteva and Ritwik Raha},
year = {2023},
url = {https://pyimg.co/k3xw6},
}

17 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

18 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

19 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

20 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

21 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

22 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

23 of 24 10-10-2023, 16:56
Getting Started with Docker for Machine Learning - PyImageSearch https://pyimagesearch.com/2023/09/04/getting-started-with-docker-for...

24 of 24 10-10-2023, 16:56

You might also like