Docker Guide For AI Research
Docker Guide For AI Research
Docker Guide For AI Research
For AI Research
By
Elvin Nur Furqon
Version 1.0
Table of Contents
1. Optimized Pytorch for Nvidia GPU...................................................................................3
1.1 Prerequisites........................................................................................................................3
1.2 Running Pytorch Using Docker.............................................................................................3
1.2.1 Pull Images.................................................................................................................................................3
1.2.2 Create Container........................................................................................................................................3
1.2.2 Start Docker...............................................................................................................................................3
3. MMDetection..................................................................................................................5
3.1 Prerequisites........................................................................................................................6
3.2 Running MMDetection Using Docker...................................................................................6
3.2.1 Build image................................................................................................................................................6
3.2.2 Create Container........................................................................................................................................6
3.2.2 Start Docker...............................................................................................................................................6
The PyTorch NGC Container Is optimized for GPU acceleration, and contains a validated set
of libraries that enable and optimize GPU performance. This container also contains software
for accelerating ETL (DALI, RAPIDS), Training (cuDNN, NCCL), and Inference (TensorRT)
workloads.
1.1 Prerequisites
Using the PyTorch NGC Container requires the host system to have the following installed:
Docker
https://docs.docker.com/engine/install/ubuntu/
Nvidia GPU Drivers
https://www.nvidia.com/download/index.aspx
Nvidia Container Toolkit
https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-
guide.html
1.2 Running Pytorch Using Docker
1.2.1 Pull Images
Select tags depends on pytorch version you want to use it
https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch/tags
The TensorFlow NGC Container is optimized for GPU acceleration, and contains a validated set
of libraries that enable and optimize GPU performance. This container may also contain
modifications to the TensorFlow source code in order to maximize performance and
compatibility. This container also contains software for accelerating ETL (DALI, RAPIDS), Training
(cuDNN, NCCL), and Inference (TensorRT) workloads.
2.1 Prerequisites
Using the PyTorch NGC Container requires the host system to have the following installed:
Docker
https://docs.docker.com/engine/install/ubuntu/
Nvidia GPU Drivers
https://www.nvidia.com/download/index.aspx
Nvidia Container Toolkit
https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-
guide.html
2.2 Running Tensorflow Using Docker
2.2.1 Pull Images
Select tags depends on tensorflow version you want to use it
https://catalog.ngc.nvidia.com/orgs/nvidia/containers/tensorflow/tags
3. MMDetection
MMDetection is an object detection toolbox that contains a rich set of object detection,
instance segmentation, and panoptic segmentation methods as well as related components and
modules
MMDetection consists of 7 main parts, apis, structures, datasets, models, engine, evaluation
and visualization.
apis provides high-level APIs for model inference.
structures provides data structures like bbox, mask, and DetDataSample.
datasets supports various dataset for object detection, instance segmentation, and
panoptic segmentation.
o transforms contains a lot of useful data augmentation transforms.
o samplers defines different data loader sampling strategy.
models is the most vital part for detectors and contains different components of a
detector.
o detectors defines all of the detection model classes.
o data_preprocessors is for preprocessing the input data of the model.
o backbones contains various backbone networks.
o necks contains various neck components.
o dense_heads contains various detection heads that perform dense predictions.
o roi_heads contains various detection heads that predict from RoIs.
o seg_heads contains various segmentation heads.
o losses contains various loss functions.
o task_modules provides modules for detection tasks. E.g. assigners, samplers, box
coders, and prior generators.
o layers provides some basic neural network layers.
engine is a part for runtime components.
o runner provides extensions for MMEngine’s runner.
o schedulers provides schedulers for adjusting optimization hyperparameters.
o optimizers provides optimizers and optimizer wrappers.
o hooks provides various hooks of the runner.
evaluation provides different metrics for evaluating model performance.
visualization is for visualizing detection results.
3.1 Prerequisites
Using the MMDetection requires the host system to have the following installed:
Docker
https://docs.docker.com/engine/install/ubuntu/
Example :
$ wget https://github.com/open-mmlab/mmdetection/archive/refs/tags/v3.1.0.tar.gz
$ tar -xvf v3.1.0.tar.gz
$ cd mmdetection
$ docker build -t mmdetection docker/
4.1 Prerequisites
Using the MMDetection requires the host system to have the following installed:
Docker
https://docs.docker.com/engine/install/ubuntu/
Nvidia GPU Drivers
https://www.nvidia.com/download/index.aspx
Nvidia Container Toolkit
https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-
guide.html
Example :
$ wget https://github.com/WongKinYiu/yolov7/archive/refs/tags/v0.1.tar.gz
$ tar -xvf v0.1.tar.gz
$ cd yolov7
$ docker build -t mmdetection docker/