yunseokim/dl-env

By yunseokim

Updated 7 months ago

Images for building a deep learning development environment based on NVIDIA Container Toolkit.

Image
Languages & frameworks
Machine learning & AI
Data science
1

1.1K

yunseokim/dl-env repository overview

dl-env-docker

Dockerfiles for building a deep learning development environment, which is based on CUDA & cuDNN images provided by the nvidia/cuda repository on Docker Hub.
For more details, read my blog posts.

Prerequisites

Overview of Dockerfiles

Three flavors of images are provided:

  • base: Includes CUDA & cuDNN, setuptools, and pip.
  • torch: Builds on the base and includes the JupyterLab, Numpy, Scipy, pandas, Matplotlib, Seaborn, scikit-learn, scikit-image, tqdm, and PyTorch.
  • rapids: Builds on the torch and includes the Cupy, RAPIDS packages(cuDF, cuML, cuGraph, cuxfilter, cuCIM, RAFT, cuVS), and DALI.

How to use

Using pre-built images

Pre-built images are available in this repository on Docker Hub.
You can pull the images with the following command.

# Tag(base)
docker pull yunseokim/dl-env:base-cuda12.4.1-cudnn9.1.0-ubuntu22.04

# Tag(torch)
docker pull yunseokim/dl-env:torch-cuda12.4.1-cudnn9.1.0-ubuntu22.04

# Tag(rapids)
docker pull yunseokim/dl-env:rapids-cuda12.4.1-cudnn9.1.0-ubuntu22.04

When you run a container from this prebuilt image, the account password for the 'remote' user is initialized to satisfied-flip-remake. It is extremely vulnerable, so reset the login password immediately after the first run of the container.

Build manually

After downloading the desired Dockerfile from the yunseo-kim/dl-env-docker GitHub repository, you can build the image yourself by running the following command from the path where the Dockerfile is located.

export DL_ENV_PASSWD="<your_own_password>" && \
docker build -t dl-env:<tag> -f ./Dockerfile \
--secret id=USER_PASSWORD,env=DL_ENV_PASSWD .

Enter the tag of your choice in the <tag> field, and in the <your_own_password> field, enter the login password to be used when remotely login to the 'remote' account with SSH.

Docker run example
  • Make sure to add the --gpus all argument to use GPUs in the container runtime.
  • Below is an example format for a Docker run. You can customize it to your needs.
docker run -itd --name dl-env --gpus all \
-p <server-port>:<container-jupyter-port> \
-p <server-port>:<container-ssh-port> \
--restart <always> \
-v <volume-name>:<workspace> \
-w <workspace> \
<image-name>:<tag>

Tag summary

Content type

Image

Digest

sha256:e0feb4f50

Size

12.2 GB

Last updated

7 months ago

docker pull yunseokim/dl-env:rapids-cuda13.0.2-cudnn9.14.0-ubuntu24.04