Skip to content

Conversation

@weiji14
Copy link
Member

@weiji14 weiji14 commented Apr 7, 2025

Foundational Dockerfile for CUDA GPU packages, based off rapidsai/miniforge-cuda.

Chain of Docker images:

graph LR;
    ubuntu["ubuntu<br>:24.04"]-->nvidia-cuda["nvidia/cuda<br>:12.8.0-base-ubuntu24.04"]
    nvidia-cuda-->rapidsai-miniforge["rapidsai/miniforge-cuda<br>:cuda12.8.0-base-ubuntu24.04-py3.13"]
    rapidsai-miniforge-->cuda-notebook["pangeo/cuda-notebook"]
    cuda-notebook-->cupy-notebook["pangeo/cupy-notebook (TODO)"]
   
   click ubuntu "https://hub.docker.com/_/ubuntu/" _blank
   click nvidia-cuda "https://catalog.ngc.nvidia.com/orgs/nvidia/containers/cuda" "Open this in a new tab" _blank
    click rapidsai-miniforge "https://hub.docker.com/r/rapidsai/miniforge-cuda" "Open this in a new tab" _blank
Loading

Notes:

  • Not using rapidsai/base or rapidsai/notebooks because
    1. they contain all RAPIDS AI libraries, that add up to about 10GB+. We can depend on a minimal set that the Pangeo community needs (e.g. cuspatial and kvikio?).
    2. They use /home/rapids with UID 1001, so incompatible with repo2docker's /home/jovyan with UID 1000 setup. We do need to rename /home/ubuntu to /home/jovyan in the rapidsai/miniforge-cuda image though following this, xref Ubuntu 24.04 comes with existing non-root user jupyterhub/repo2docker#1346
  • Currently building on linux/amd64 only. Multi-arch support to be handled later.

Packages in cuda-notebook:

Packages in cupy-notebook:

  • cuspatial
  • cupy-xarray
  • etc

TODO:

  • Initial Dockerfile setup
  • Bring over more of base-image docker tricks to cuda-notebook
  • Create cupy-notebook using repo2docker style (i.e. dependencies in environment.yml)
  • etc

Test locally:

make cuda-notebook
docker run --rm -it -p 8888:8888 --gpus all pangeo/cuda-notebook:master

References:

Resolves #457

Foundational Dockerfile for CUDA GPU packages, based off rapidsai/miniforge-cuda with `cuda-version` and `jupyterhub-singleuser` installed. Updated the Makefile and main README.md to mention this new `cuda-notebook` image.
@weiji14 weiji14 self-assigned this Apr 7, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2025

Binder 👈 Try on Mybinder.org!

A JupyterLab extension for displaying dashboards of GPU usage! Repo at https://github.com/rapidsai/jupyterlab-nvdashboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using GPU-optimized NGC images as base for ML (Pytorch/Tensorflow) docker images

2 participants