From bbdf620cc8c24187413b44640b16ee9cc8fd32b0 Mon Sep 17 00:00:00 2001 From: Jaya Venkatesh Date: Tue, 26 May 2026 11:14:39 -0700 Subject: [PATCH] Remove testing libraries in the `base` and `notebook` images (#853) Towards https://github.com/rapidsai/docker/issues/835 Upstream dependency: https://github.com/rapidsai/cugraph/pull/5447 must be merged first for CI to pass for this PR. - Updates `context/notebooks.sh` to use `run_notebooks` file-key for the cugraph `dependencies.yaml`, while keeping the `test_notebooks` key for cudf/cuml - Adds container-canary checks verifying `pytest` libraries (regex match for conda list starting with pytest) are not installed in base or notebooks images This removes `pytest` and other transitive dependencies from the Docker images. Authors: - Jaya Venkatesh (https://github.com/jayavenkatesh19) - James Lamb (https://github.com/jameslamb) Approvers: - James Lamb (https://github.com/jameslamb) URL: https://github.com/rapidsai/docker/pull/853 --- context/notebooks.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/context/notebooks.sh b/context/notebooks.sh index ca7462bb..5677cc29 100755 --- a/context/notebooks.sh +++ b/context/notebooks.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2023-2025, NVIDIA CORPORATION. +# Copyright (c) 2023-2026, NVIDIA CORPORATION. # Clones repos with notebooks & compiles notebook test dependencies # Requires environment variables: @@ -29,14 +29,17 @@ for REPO in "${NOTEBOOK_REPOS[@]}"; do cp -rL "$SOURCE" "$DESTINATION" fi - if [ -f "$REPO/dependencies.yaml" ] && yq -e '.files.test_notebooks' "$REPO/dependencies.yaml" >/dev/null; then - echo "Running dfg on $REPO" - rapids-dependency-file-generator \ - --config "$REPO/dependencies.yaml" \ - --file-key test_notebooks \ - --matrix "cuda=${CUDA_VER%.*};arch=$(arch);py=${PYTHON_VER}" \ - --output conda >"/dependencies/${REPO}_notebooks_tests_dependencies.yaml" + if [[ "${REPO}" == "cugraph" ]]; then + FILE_KEY="run_notebooks" + else + FILE_KEY="test_notebooks" fi + echo "Running dfg on $REPO (file-key: $FILE_KEY)" + rapids-dependency-file-generator \ + --config "$REPO/dependencies.yaml" \ + --file-key "$FILE_KEY" \ + --matrix "cuda=${CUDA_VER%.*};arch=$(arch);py=${PYTHON_VER}" \ + --output conda >"/dependencies/${REPO}_notebooks_tests_dependencies.yaml" done pushd "/dependencies"