From 1dd77ba0a73a8471f465748d4023d552417a94c7 Mon Sep 17 00:00:00 2001 From: Jaya Venkatesh Date: Mon, 2 Mar 2026 22:59:50 -0800 Subject: [PATCH 01/13] Set CONDA_PREFIX env var in miniforge-cuda stage to fix cupy import --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index b5dbc268..7a150a47 100644 --- a/Dockerfile +++ b/Dockerfile @@ -83,6 +83,7 @@ ARG LINUX_VER=notset ARG PYTHON_VER=notset ARG DEBIAN_FRONTEND=noninteractive ENV PATH=/opt/conda/bin:$PATH +ENV CONDA_PREFIX=/opt/conda ENV PYTHON_VERSION=${PYTHON_VER} SHELL ["/bin/bash", "-euo", "pipefail", "-c"] From dff66bf4c3533ba11a9692d2dde4a8f8783b3888 Mon Sep 17 00:00:00 2001 From: Jaya Venkatesh Date: Thu, 5 Mar 2026 15:41:41 -0800 Subject: [PATCH 02/13] activate conda base environment in entrypoint. Signed-off-by: Jaya Venkatesh --- Dockerfile | 1 - context/entrypoint.sh | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7a150a47..b5dbc268 100644 --- a/Dockerfile +++ b/Dockerfile @@ -83,7 +83,6 @@ ARG LINUX_VER=notset ARG PYTHON_VER=notset ARG DEBIAN_FRONTEND=noninteractive ENV PATH=/opt/conda/bin:$PATH -ENV CONDA_PREFIX=/opt/conda ENV PYTHON_VERSION=${PYTHON_VER} SHELL ["/bin/bash", "-euo", "pipefail", "-c"] diff --git a/context/entrypoint.sh b/context/entrypoint.sh index 991cbead..7b500120 100755 --- a/context/entrypoint.sh +++ b/context/entrypoint.sh @@ -33,6 +33,10 @@ if [ "$(uname -m)" = "aarch64" ]; then fi fi +#Activate the base environment +. /opt/conda/etc/profile.d/conda.sh +conda activate base + # Run whatever the user wants. if [ "${UNQUOTE}" = "true" ]; then # splitting elements without quoting is intentional here, From 2f07c548d27cdfbed5190539f482621aeb78535c Mon Sep 17 00:00:00 2001 From: Jaya Venkatesh Date: Thu, 5 Mar 2026 16:32:09 -0800 Subject: [PATCH 03/13] added CONDA_PREFIX arg to Dockerfile Signed-off-by: Jaya Venkatesh --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index b5dbc268..7a150a47 100644 --- a/Dockerfile +++ b/Dockerfile @@ -83,6 +83,7 @@ ARG LINUX_VER=notset ARG PYTHON_VER=notset ARG DEBIAN_FRONTEND=noninteractive ENV PATH=/opt/conda/bin:$PATH +ENV CONDA_PREFIX=/opt/conda ENV PYTHON_VERSION=${PYTHON_VER} SHELL ["/bin/bash", "-euo", "pipefail", "-c"] From 0b9ac2c07e3528f1a43bcb4686209a665dc3b0c6 Mon Sep 17 00:00:00 2001 From: Jaya Venkatesh Date: Fri, 6 Mar 2026 10:36:08 -0800 Subject: [PATCH 04/13] Update Dockerfile Co-authored-by: James Lamb --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 7a150a47..ae91bdd6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -83,6 +83,7 @@ ARG LINUX_VER=notset ARG PYTHON_VER=notset ARG DEBIAN_FRONTEND=noninteractive ENV PATH=/opt/conda/bin:$PATH +# ensure conda's files and configuration can be found at runtime even if environment activation was bypassed ENV CONDA_PREFIX=/opt/conda ENV PYTHON_VERSION=${PYTHON_VER} From e4eb3b00d520f48326854672e2ec309751a6bf41 Mon Sep 17 00:00:00 2001 From: Jaya Venkatesh Date: Fri, 6 Mar 2026 10:36:16 -0800 Subject: [PATCH 05/13] Update context/entrypoint.sh Co-authored-by: James Lamb --- context/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/entrypoint.sh b/context/entrypoint.sh index 7b500120..61e64616 100755 --- a/context/entrypoint.sh +++ b/context/entrypoint.sh @@ -33,7 +33,7 @@ if [ "$(uname -m)" = "aarch64" ]; then fi fi -#Activate the base environment +# Activate the base environment . /opt/conda/etc/profile.d/conda.sh conda activate base From 67959dbb9709f5ecac7ec9aed1cfe6bfee08f623 Mon Sep 17 00:00:00 2001 From: Jaya Venkatesh Date: Fri, 6 Mar 2026 10:45:24 -0800 Subject: [PATCH 06/13] add new container canary tests Signed-off-by: Jaya Venkatesh --- tests/container-canary/base.yml | 8 ++++++++ tests/container-canary/notebooks.yml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/tests/container-canary/base.yml b/tests/container-canary/base.yml index 644f0d07..13818a4d 100644 --- a/tests/container-canary/base.yml +++ b/tests/container-canary/base.yml @@ -124,3 +124,11 @@ checks: - /bin/bash - -c - "[[ $(conda env list --quiet | grep --count -E '^[A-Za-z]+') == 1 ]];" + - name: conda-prefix-non-interactive + description: Checks conda configuration in non-interactive mode + probe: + exec: + command: + - /bin/bash + - -c + - 'test -d "$CONDA_PREFIX" && conda config --show-sources' diff --git a/tests/container-canary/notebooks.yml b/tests/container-canary/notebooks.yml index 8a5c9a72..2f250104 100644 --- a/tests/container-canary/notebooks.yml +++ b/tests/container-canary/notebooks.yml @@ -23,3 +23,11 @@ checks: - jupyter - lab - --version + - name: conda-base-active + description: The base conda environment is active + probe: + exec: + command: + - /bin/bash + - -c + - 'conda info --envs | grep -E "^base\s+\*"' From c4fed7b3a9d8829880642aaa58b6a0f49941181f Mon Sep 17 00:00:00 2001 From: Jaya Venkatesh Date: Fri, 6 Mar 2026 12:38:43 -0800 Subject: [PATCH 07/13] Oh yes, that's better! Co-authored-by: James Lamb --- tests/container-canary/notebooks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/container-canary/notebooks.yml b/tests/container-canary/notebooks.yml index 2f250104..3357a6ef 100644 --- a/tests/container-canary/notebooks.yml +++ b/tests/container-canary/notebooks.yml @@ -30,4 +30,4 @@ checks: command: - /bin/bash - -c - - 'conda info --envs | grep -E "^base\s+\*"' + - '[[ "${CONDA_DEFAULT_ENV}" == "base" ]];' From b7007fdbf6272da8d2cf9a6bc08c37d7dc00e1e9 Mon Sep 17 00:00:00 2001 From: Jaya Venkatesh Date: Fri, 6 Mar 2026 13:05:28 -0800 Subject: [PATCH 08/13] fixed tests Signed-off-by: Jaya Venkatesh --- tests/container-canary/base.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/container-canary/base.yml b/tests/container-canary/base.yml index 13818a4d..ad8e4c49 100644 --- a/tests/container-canary/base.yml +++ b/tests/container-canary/base.yml @@ -124,11 +124,19 @@ checks: - /bin/bash - -c - "[[ $(conda env list --quiet | grep --count -E '^[A-Za-z]+') == 1 ]];" - - name: conda-prefix-non-interactive - description: Checks conda configuration in non-interactive mode + - name: conda-prefix + description: Conda prefix set to /opt/conda probe: exec: command: - /bin/bash - -c - - 'test -d "$CONDA_PREFIX" && conda config --show-sources' + - '[[ "${CONDA_PREFIX}" == "/opt/conda" ]];' + - name: conda-base-active + description: The base conda environment is active + probe: + exec: + command: + - /bin/bash + - -c + - '[[ "${CONDA_DEFAULT_ENV}" == "base" ]];' From ac3376514e44616a8b562f17c605e42cb0c45f02 Mon Sep 17 00:00:00 2001 From: Jaya Venkatesh Date: Fri, 6 Mar 2026 13:22:42 -0800 Subject: [PATCH 09/13] fixed container-canary tests Signed-off-by: Jaya Venkatesh --- tests/container-canary/notebooks.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tests/container-canary/notebooks.yml b/tests/container-canary/notebooks.yml index 3357a6ef..8a5c9a72 100644 --- a/tests/container-canary/notebooks.yml +++ b/tests/container-canary/notebooks.yml @@ -23,11 +23,3 @@ checks: - jupyter - lab - --version - - name: conda-base-active - description: The base conda environment is active - probe: - exec: - command: - - /bin/bash - - -c - - '[[ "${CONDA_DEFAULT_ENV}" == "base" ]];' From 92e029ec5deb5ab91ae58b909abd020dfc5cf151 Mon Sep 17 00:00:00 2001 From: Jaya Venkatesh Date: Fri, 6 Mar 2026 15:38:30 -0800 Subject: [PATCH 10/13] delete active environment test Signed-off-by: Jaya Venkatesh --- tests/container-canary/base.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tests/container-canary/base.yml b/tests/container-canary/base.yml index ad8e4c49..1f79cfc1 100644 --- a/tests/container-canary/base.yml +++ b/tests/container-canary/base.yml @@ -132,11 +132,3 @@ checks: - /bin/bash - -c - '[[ "${CONDA_PREFIX}" == "/opt/conda" ]];' - - name: conda-base-active - description: The base conda environment is active - probe: - exec: - command: - - /bin/bash - - -c - - '[[ "${CONDA_DEFAULT_ENV}" == "base" ]];' From 0bfa78ee7c94a2c379346081363bc91379a87cc5 Mon Sep 17 00:00:00 2001 From: Jaya Venkatesh Date: Mon, 9 Mar 2026 15:53:55 -0700 Subject: [PATCH 11/13] changed entrypoint to login shell Signed-off-by: Jaya Venkatesh --- context/entrypoint.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/context/entrypoint.sh b/context/entrypoint.sh index 61e64616..78ee50bf 100755 --- a/context/entrypoint.sh +++ b/context/entrypoint.sh @@ -1,5 +1,5 @@ -#!/usr/bin/env bash -# Copyright (c) 2023-2025, NVIDIA CORPORATION. +#!/usr/bin/env -S bash -l +# Copyright (c) 2023-2026, NVIDIA CORPORATION. set -eo pipefail @@ -10,6 +10,9 @@ https://developer.download.nvidia.com/licenses/NVIDIA_Deep_Learning_Container_Li EOF +# Activate conda (login shell sources from /etc/profile.d/conda.sh) +conda activate + if [ -e "/home/rapids/environment.yml" ]; then echo "environment.yml found. Installing packages." timeout ${CONDA_TIMEOUT:-600} mamba env update -n base -y -f /home/rapids/environment.yml || exit $? @@ -33,10 +36,6 @@ if [ "$(uname -m)" = "aarch64" ]; then fi fi -# Activate the base environment -. /opt/conda/etc/profile.d/conda.sh -conda activate base - # Run whatever the user wants. if [ "${UNQUOTE}" = "true" ]; then # splitting elements without quoting is intentional here, From e8b319f68a106a83f825f28bce3f650bb0e4e162 Mon Sep 17 00:00:00 2001 From: Jaya Venkatesh Date: Mon, 9 Mar 2026 16:01:26 -0700 Subject: [PATCH 12/13] Update Dockerfile Co-authored-by: James Lamb --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index ae91bdd6..14900bdc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -84,6 +84,7 @@ ARG PYTHON_VER=notset ARG DEBIAN_FRONTEND=noninteractive ENV PATH=/opt/conda/bin:$PATH # ensure conda's files and configuration can be found at runtime even if environment activation was bypassed +# ensure conda's files and configuration can be found at runtime even if environment activation was bypassed ENV CONDA_PREFIX=/opt/conda ENV PYTHON_VERSION=${PYTHON_VER} From 594e94eeaea2af7b18fc362a34900773740b5fef Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 10 Mar 2026 09:15:32 -0500 Subject: [PATCH 13/13] Apply suggestion from @jameslamb --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 14900bdc..ae91bdd6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -84,7 +84,6 @@ ARG PYTHON_VER=notset ARG DEBIAN_FRONTEND=noninteractive ENV PATH=/opt/conda/bin:$PATH # ensure conda's files and configuration can be found at runtime even if environment activation was bypassed -# ensure conda's files and configuration can be found at runtime even if environment activation was bypassed ENV CONDA_PREFIX=/opt/conda ENV PYTHON_VERSION=${PYTHON_VER}