From 6917e4e796c6dcad389569817f789eebea3cf6c5 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Thu, 5 Mar 2026 15:03:26 -0800 Subject: [PATCH 1/9] Use an interactive login shell for entrypoint For scripts like `profile.sh` to run (needed for Conda activation) we need to use a login shell. Hence the addition of `-l` (L) here. Also interactive shells tend to behave a bit better from a user experience perspective. So have added `-i` too. --- context/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/entrypoint.sh b/context/entrypoint.sh index 991cbead..dca8080f 100755 --- a/context/entrypoint.sh +++ b/context/entrypoint.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bash -il # Copyright (c) 2023-2025, NVIDIA CORPORATION. set -eo pipefail From 93acb34418a6fe0f1352e874429e5694736f32fa Mon Sep 17 00:00:00 2001 From: jakirkham Date: Thu, 5 Mar 2026 15:40:23 -0800 Subject: [PATCH 2/9] Skip shellcheck shebang option error (SC2096) Passing `-il` works fine with `bash` in the shebang. Disable shellcheck warning related to this. --- context/entrypoint.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/context/entrypoint.sh b/context/entrypoint.sh index dca8080f..cae63e26 100755 --- a/context/entrypoint.sh +++ b/context/entrypoint.sh @@ -1,5 +1,10 @@ #!/usr/bin/env bash -il # Copyright (c) 2023-2025, NVIDIA CORPORATION. +# +# Shellcheck doesn't like multiple options to the shell in the shebang. +# However this works fine in practice. So disable this shellcheck error. +# +# shellcheck disable=SC2096 set -eo pipefail From a2eed08f8864e18895603d632cb9085e46267407 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Thu, 5 Mar 2026 15:40:43 -0800 Subject: [PATCH 3/9] Bump year to 2026 --- context/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/entrypoint.sh b/context/entrypoint.sh index cae63e26..864de5dc 100755 --- a/context/entrypoint.sh +++ b/context/entrypoint.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -il -# Copyright (c) 2023-2025, NVIDIA CORPORATION. +# Copyright (c) 2023-2026, NVIDIA CORPORATION. # # Shellcheck doesn't like multiple options to the shell in the shebang. # However this works fine in practice. So disable this shellcheck error. From dc268dcf68dea3257bd1650d4598d3bdee686631 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Fri, 6 Mar 2026 13:12:07 -0800 Subject: [PATCH 4/9] Stick to just `-l` (login) Stick to the login shell (`-l`) for now. Can follow-up on interactive (`-i`) separately. --- context/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/entrypoint.sh b/context/entrypoint.sh index 864de5dc..52c6f55e 100755 --- a/context/entrypoint.sh +++ b/context/entrypoint.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash -il +#!/usr/bin/env bash -l # Copyright (c) 2023-2026, NVIDIA CORPORATION. # # Shellcheck doesn't like multiple options to the shell in the shebang. From b3640bb81296047517d710db80a7fb3944589210 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Fri, 6 Mar 2026 13:16:20 -0800 Subject: [PATCH 5/9] Test Conda env is active in notebook container --- tests/container-canary/notebooks.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/container-canary/notebooks.yml b/tests/container-canary/notebooks.yml index 8a5c9a72..b7d3edf6 100644 --- a/tests/container-canary/notebooks.yml +++ b/tests/container-canary/notebooks.yml @@ -7,6 +7,14 @@ description: | are expected to have. documentation: https://github.com/rapidsai/docker checks: + - name: tst-conda-active + description: test the conda environment is active + probe: + exec: + command: + - /bin/bash + - -c + - '[ "${CONDA_EXE+x}" ];' - name: env-dask-cuda description: dask-labextension is configured to use dask-cuda by default via environment variables probe: From 2e8bbf9f1473a62c827b819a6030fcc055e86a2b Mon Sep 17 00:00:00 2001 From: jakirkham Date: Fri, 6 Mar 2026 13:20:29 -0800 Subject: [PATCH 6/9] Use `env -S` to address shellcheck lint --- context/entrypoint.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/context/entrypoint.sh b/context/entrypoint.sh index 52c6f55e..2dbb8c7c 100755 --- a/context/entrypoint.sh +++ b/context/entrypoint.sh @@ -1,10 +1,5 @@ -#!/usr/bin/env bash -l +#!/usr/bin/env -S bash -l # Copyright (c) 2023-2026, NVIDIA CORPORATION. -# -# Shellcheck doesn't like multiple options to the shell in the shebang. -# However this works fine in practice. So disable this shellcheck error. -# -# shellcheck disable=SC2096 set -eo pipefail From f8079fc102e1d69d7e75fdafbdb263528e1b10d9 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Fri, 6 Mar 2026 13:23:34 -0800 Subject: [PATCH 7/9] Move Conda active env test to `base` --- tests/container-canary/base.yml | 8 ++++++++ tests/container-canary/notebooks.yml | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/container-canary/base.yml b/tests/container-canary/base.yml index 644f0d07..76fdbb5c 100644 --- a/tests/container-canary/base.yml +++ b/tests/container-canary/base.yml @@ -29,6 +29,14 @@ checks: - -c # the second component could have a 't' for like '3.15t' for free-threaded builds at some point in the future - '[[ "${PYTHON_VERSION}" =~ ^[0-9]{1,2}\.[0-9t]{1,2}$ ]]' + - name: tst-conda-active + description: test the conda environment is active + probe: + exec: + command: + - /bin/bash + - -c + - '[ "${CONDA_EXE+x}" ];' - name: tool-conda description: conda can be executed probe: diff --git a/tests/container-canary/notebooks.yml b/tests/container-canary/notebooks.yml index b7d3edf6..8a5c9a72 100644 --- a/tests/container-canary/notebooks.yml +++ b/tests/container-canary/notebooks.yml @@ -7,14 +7,6 @@ description: | are expected to have. documentation: https://github.com/rapidsai/docker checks: - - name: tst-conda-active - description: test the conda environment is active - probe: - exec: - command: - - /bin/bash - - -c - - '[ "${CONDA_EXE+x}" ];' - name: env-dask-cuda description: dask-labextension is configured to use dask-cuda by default via environment variables probe: From 7965c6df52aa1829144636ec8df89b0033229c0e Mon Sep 17 00:00:00 2001 From: jakirkham Date: Fri, 6 Mar 2026 15:42:43 -0800 Subject: [PATCH 8/9] Run `conda activate` in entrypoint --- context/entrypoint.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/context/entrypoint.sh b/context/entrypoint.sh index 2dbb8c7c..7b4c6028 100755 --- a/context/entrypoint.sh +++ b/context/entrypoint.sh @@ -10,6 +10,8 @@ https://developer.download.nvidia.com/licenses/NVIDIA_Deep_Learning_Container_Li EOF +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 $? From 02c21d59b98ff1c818492794c36eea2f90eb7ef3 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 10 Mar 2026 10:27:26 -0500 Subject: [PATCH 9/9] Update tests/container-canary/base.yml --- tests/container-canary/base.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/container-canary/base.yml b/tests/container-canary/base.yml index 76fdbb5c..321de7b3 100644 --- a/tests/container-canary/base.yml +++ b/tests/container-canary/base.yml @@ -30,12 +30,12 @@ checks: # the second component could have a 't' for like '3.15t' for free-threaded builds at some point in the future - '[[ "${PYTHON_VERSION}" =~ ^[0-9]{1,2}\.[0-9t]{1,2}$ ]]' - name: tst-conda-active - description: test the conda environment is active + description: test the conda environment is active if running with a login shell probe: exec: command: - /bin/bash - - -c + - -lc - '[ "${CONDA_EXE+x}" ];' - name: tool-conda description: conda can be executed