Repository overhaul for RAPIDS v23.08 · Issue #539 · rapidsai/docker (original) (raw)
docker
repo (RAPIDS end-user images) overhaul
This issue outlines how the RAPIDS end-user images in the docker
repo will be overhauled to improve functionality and performance.
Images
Requirements
These are the requirements for all images produced by this repo.
- Must use multi-architectural images that publish
amd64
andaarch64
/arm64
images to the same docker repository
a. This eliminates thearm64
variant repositories such as https://hub.docker.com/r/rapidsai/rapidsai-core-arm64 - Must install all conda package into the
base
conda environment - Default user must be non-
root
user namedrapids
- Must define the
WORKDIR
as therapids
user's home directory - Must use a tag in the format:
${RAPIDS_VER}-cuda${CUDA_VER}-py${PYTHON_VER}
a. Nightly builds will appenda
to theRAPIDS_VER
(eg23.08a
) - Must support the current matrix of CUDA and Python versions (currently defined here)
Considerations
- Consider defining any dependencies not inherited from RAPIDS libraries in a
dependencies.yaml
consumable by dependency-file-generator
a. If there aren't many, might be simpler to directly install them (egmamba install rapids ipython
) - Consider implementing
sudoers
allowing therapids
user tosudo
Base image
This image is the basic docker image that installs the RAPIDS suite of libraries.
Requirements
- Must
FROM
rapidsai/mambaforge-cuda - Must use default
CMD
to launch anipython
REPL - Must install the rapids meta package
- Must use
dask
/distributed
/dask-sql
nightly conda builds for nightly image builds - Must include
ipython
dependency - Must be published to
rapidsai/base
Notebooks image
This image extends the base image to include Jupyter and RAPIDS notebooks.
Requirements
- Must
FROM
the base image define above - Must use default
CMD
to launch (in the foreground) a jupyter server - Must install the required "notebook" dependencies from all RAPIDS repositories (eg https://github.com/rapidsai/cudf/blob/branch-23.04/dependencies.yaml#L304)
- Must clone the RAPIDS notebooks into the
WORKDIR
- Must be published to
rapidsai/notebooks
Implementation
Building the base and notebooks images should utilize a multi-stage docker build.
Stage 1
- Clone RAPIDS repositories for the current branch
- Generate conda environment files for each repositories' "notebook" dependencies
- Merge the conda environment files
- Collect the
notebooks
directory of each RAPIDS repository and associated datasets if required
Stage 2
- Build the base image defined above
Stage 3
- Pull the merged conda environment file from Stage 1
- Copy the notebooks directories from Stage 1
- Build the notebooks image defined above using the merged conda environment file for dependencies
Testing
Base image
The base image will be tested using basic RAPIDS smoke tests being developed in their respective repositories. The full suite of unit tests will not be run.
Notebooks image
The notebooks image will be tested using the "notebook tests" which basically executes the notebooks provided by each repositories (consolidated in the notebooks repo).
It will be necessary to standardize the mechanism for testing each notebook and for exempting a notebook from testing. cugraph
provides a reliable way for doing this: https://github.com/rapidsai/cugraph/blob/branch-23.04/ci/notebook_list.py.
Breaking changes
These are the breaking changes that will occur when v23.06 of this docker
repository is released:
rapidsai/rapidsai-core
is deprecated and superceded byrapidsai/base
andrapidsai/notebooks
- "Runtime" images (eg
rapidsai/rapidsai:23.02-cuda11.8-runtime-ubuntu22.04-py3.10
) are replaced by therapidsai/notebooks
docker repo IMAGE_TYPE
&LINUX_VER
will be removed from image tags. Change${RAPIDS_VER}-cuda${CUDA_VER}-${IMAGE_TYPE}-${LINUX_VER}-py${PYTHON_VER}
to${RAPIDS_VER}-cuda${CUDA_VER}-py${PYTHON_VER}
arm64
image repositories (egrapidsai/rapidsai-arm64
) are deprecated and superceded by multi-architectural images inrapidsai/base
andrapidsai/notebooks
- Images will not longer default to the
root
user. Instead they will use non-root userrapids
a. To use previous behavior, supply--user root
to thedocker run
command - The
base
image will start anipython
REPL instead of abash
shell
a. To use previous behavior, supply adocker run
CMD
ofbash
(egdocker run -it ${IMAGE} bash
) - The
notebooks
image will startjupyter-lab
in the foreground instead of running in the background and starting abash
shell.
a. To use previous behavior, supply adocker run
CMD
ofbash
(egdocker run -it ${IMAGE} bash
) and runjupyter-lab
in the background - The notebooks directory in the
notebooks
image will not longer contain the full source code git clone of RAPIDS repositories
a. To use previous behavior, start the container andgit clone ${RAPIDS_GIT_URL}
for each required RAPIDS repository - The
rapids
conda environment is removed and replaced by thebase
conda environment - The environment variables
EXTRA_APT_PACKAGES
&EXTRA_YUM_PACKAGES
will not longer be supported. - The devel images will be removed and replaced by devcontainers (such as Add cuspatial devcontainers cuspatial#960 for example)
LINUX_VER
will be removed from the image tags. The Ubuntu version is implied by the CUDA version.- The notebooks directory is moved from
/rapids/notebooks
to/home/rapids/notebooks
centos7
&rockylinux8
OSes are dropped.
a. Users can manually build the images with these OSes by supplying--build-arg LINUX_VER=centos7
, but this not tested/supported- Nightly images are no longer uploaded to a separate docker repo. They are uploaded to
rapidsai/base
andrapidsai-notebooks
with analpha
tag for theRAPIDS_VER
(eg23.08a
).
Deprecated docker repositories
These docker repositories will be deprecated:
- https://hub.docker.com/r/rapidsai/rapidsai
- https://hub.docker.com/r/rapidsai/rapidsai-core
- https://hub.docker.com/r/rapidsai/rapidsai-core-arm64
- https://hub.docker.com/r/rapidsai/rapidsai-core-dev
- https://hub.docker.com/r/rapidsai/rapidsai-core-dev-arm64
- https://hub.docker.com/r/rapidsai/rapidsai-core-dev-nightly
- https://hub.docker.com/r/rapidsai/rapidsai-core-dev-nightly-arm64
- https://hub.docker.com/r/rapidsai/rapidsai-core-nightly
- https://hub.docker.com/r/rapidsai/rapidsai-core-nightly-arm64
- https://hub.docker.com/r/rapidsai/rapidsai-dev
- https://hub.docker.com/r/rapidsai/rapidsai-dev-nightly
- https://hub.docker.com/r/rapidsai/rapidsai-nightly
nightly
and arm64
repos are folded into the rapidsai/base
& rapidsai/notebooks
repos. The dev
/devel
repos are replaced by devcontainers.
rapidsai/rapidsai-core
is replaced by rapidsai/base
rapidsai/rapidsai
is replaced by rapidsai/notebooks