From 753a20a9781a93da611e1c0782609ed7bcf3c790 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Tue, 19 May 2026 12:00:52 -0500 Subject: [PATCH 01/13] Use mamba to create devcontainer conda envs --- .../opt/rapids-build-utils/bin/make-conda-env.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/src/rapids-build-utils/opt/rapids-build-utils/bin/make-conda-env.sh b/features/src/rapids-build-utils/opt/rapids-build-utils/bin/make-conda-env.sh index 0a5b5e591..d6359cf2a 100755 --- a/features/src/rapids-build-utils/opt/rapids-build-utils/bin/make-conda-env.sh +++ b/features/src/rapids-build-utils/opt/rapids-build-utils/bin/make-conda-env.sh @@ -54,7 +54,7 @@ make_conda_env() { cat "${new_env_path}"; echo ""; - conda env create "${q[@]}" -n "${env_name}" -f "${new_env_path}" --solver=libmamba; + mamba env create "${q[@]}" -n "${env_name}" -f "${new_env_path}"; # If the conda env does exist but it's different from the generated one, # print the diff between the envs and update it elif ! diff -BNqw "${old_env_path}" "${new_env_path}" >/dev/null 2>&1; then @@ -73,7 +73,7 @@ make_conda_env() { # We mount in the package cache, so this should still be fast in most cases. rm -rf "${HOME}/.conda/envs/${env_name}"; - conda env create "${q[@]}" -n "${env_name}" -f "${new_env_path}" --solver=libmamba; + mamba env create "${q[@]}" -n "${env_name}" -f "${new_env_path}"; fi cp -a "${new_env_path}" "${old_env_path}"; From 4bce23eaa57a8bee58ffbe58388473bf3745fc20 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Tue, 19 May 2026 13:36:52 -0500 Subject: [PATCH 02/13] Set writable conda package cache --- features/src/mambaforge/.bashrc | 1 + 1 file changed, 1 insertion(+) diff --git a/features/src/mambaforge/.bashrc b/features/src/mambaforge/.bashrc index 24df8f59a..6b9e7b8ce 100644 --- a/features/src/mambaforge/.bashrc +++ b/features/src/mambaforge/.bashrc @@ -1,4 +1,5 @@ export MAMBA_NO_BANNER="${MAMBA_NO_BANNER:-1}"; +export CONDA_PKGS_DIRS="${CONDA_PKGS_DIRS:-${HOME}/.conda/pkgs}"; # Temporarily allow unbound variables for conda activation. nounseton="$(shopt -o nounset | tr -d '[:blank:]')"; From 872b0b922636383bc979178ff4d957a49678579b Mon Sep 17 00:00:00 2001 From: ptaylor Date: Wed, 20 May 2026 08:31:33 -0700 Subject: [PATCH 03/13] set MAMBA_ALWAYS_YES=true and MAMBA_PKGS_DIRS --- features/src/mambaforge/.bashrc | 3 ++- features/src/rapids-build-utils/.bashrc | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/features/src/mambaforge/.bashrc b/features/src/mambaforge/.bashrc index 6b9e7b8ce..d6b1a5d19 100644 --- a/features/src/mambaforge/.bashrc +++ b/features/src/mambaforge/.bashrc @@ -1,10 +1,11 @@ export MAMBA_NO_BANNER="${MAMBA_NO_BANNER:-1}"; export CONDA_PKGS_DIRS="${CONDA_PKGS_DIRS:-${HOME}/.conda/pkgs}"; +export MAMBA_PKGS_DIRS="${CONDA_PKGS_DIRS}"; # Temporarily allow unbound variables for conda activation. nounseton="$(shopt -o nounset | tr -d '[:blank:]')"; set +u; -for default_conda_env_name in ${DEFAULT_CONDA_ENV:-} ${CONDA_DEFAULT_ENV:-} base; do +for default_conda_env_name in "${DEFAULT_CONDA_ENV:-}" "${CONDA_DEFAULT_ENV:-}" "${MAMBA_DEFAULT_ENV:-}" base; do if [ -z "${default_conda_env_name:-}" ]; then continue; fi if grep -qF "(${default_conda_env_name})" <<< "${CONDA_PROMPT_MODIFIER:-}"; then break; fi if conda activate "${default_conda_env_name}" 2>/dev/null; then break; else continue; fi diff --git a/features/src/rapids-build-utils/.bashrc b/features/src/rapids-build-utils/.bashrc index b1f7ce65b..49db66db4 100644 --- a/features/src/rapids-build-utils/.bashrc +++ b/features/src/rapids-build-utils/.bashrc @@ -1,4 +1,5 @@ export CONDA_ALWAYS_YES="true"; +export MAMBA_ALWAYS_YES="true"; export CC="${CC:-"/usr/bin/gcc"}"; export CXX="${CXX:-"/usr/bin/g++"}"; export CUDAHOSTCXX="${CXX}"; From fa52914704bfb34dcf7d6173f89efd22493d02f1 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Wed, 20 May 2026 12:02:25 -0700 Subject: [PATCH 04/13] create global .condarc instead of using CONDA_PKGS_DIRS --- features/src/mambaforge/.bashrc | 2 -- features/src/mambaforge/install.sh | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/features/src/mambaforge/.bashrc b/features/src/mambaforge/.bashrc index d6b1a5d19..cb4920b7a 100644 --- a/features/src/mambaforge/.bashrc +++ b/features/src/mambaforge/.bashrc @@ -1,6 +1,4 @@ export MAMBA_NO_BANNER="${MAMBA_NO_BANNER:-1}"; -export CONDA_PKGS_DIRS="${CONDA_PKGS_DIRS:-${HOME}/.conda/pkgs}"; -export MAMBA_PKGS_DIRS="${CONDA_PKGS_DIRS}"; # Temporarily allow unbound variables for conda activation. nounseton="$(shopt -o nounset | tr -d '[:blank:]')"; diff --git a/features/src/mambaforge/install.sh b/features/src/mambaforge/install.sh index 9df10e999..bba36f46f 100644 --- a/features/src/mambaforge/install.sh +++ b/features/src/mambaforge/install.sh @@ -33,6 +33,14 @@ find /opt/conda -follow -type f -name '*.a' -delete; find /opt/conda -follow -type f -name '*.pyc' -delete; conda clean --force-pkgs-dirs --all --yes; +mkdir -p /etc/conda +cat <<"EOF" > /etc/conda/.condarc +pkg_dirs: + - ~/.conda/pkgs +envs_dirs: + - ~/.conda/envs +EOF + # Activate conda in /etc/bash.bashrc append_to_etc_bashrc "$(cat<< EOF for x in "conda" "mamba"; do From b8f84fea1de50107d8f89493ef7d531dcf282876 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Wed, 20 May 2026 12:11:05 -0700 Subject: [PATCH 05/13] Revert "create global .condarc instead of using CONDA_PKGS_DIRS" This reverts commit fa52914704bfb34dcf7d6173f89efd22493d02f1. --- features/src/mambaforge/.bashrc | 2 ++ features/src/mambaforge/install.sh | 8 -------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/features/src/mambaforge/.bashrc b/features/src/mambaforge/.bashrc index cb4920b7a..d6b1a5d19 100644 --- a/features/src/mambaforge/.bashrc +++ b/features/src/mambaforge/.bashrc @@ -1,4 +1,6 @@ export MAMBA_NO_BANNER="${MAMBA_NO_BANNER:-1}"; +export CONDA_PKGS_DIRS="${CONDA_PKGS_DIRS:-${HOME}/.conda/pkgs}"; +export MAMBA_PKGS_DIRS="${CONDA_PKGS_DIRS}"; # Temporarily allow unbound variables for conda activation. nounseton="$(shopt -o nounset | tr -d '[:blank:]')"; diff --git a/features/src/mambaforge/install.sh b/features/src/mambaforge/install.sh index bba36f46f..9df10e999 100644 --- a/features/src/mambaforge/install.sh +++ b/features/src/mambaforge/install.sh @@ -33,14 +33,6 @@ find /opt/conda -follow -type f -name '*.a' -delete; find /opt/conda -follow -type f -name '*.pyc' -delete; conda clean --force-pkgs-dirs --all --yes; -mkdir -p /etc/conda -cat <<"EOF" > /etc/conda/.condarc -pkg_dirs: - - ~/.conda/pkgs -envs_dirs: - - ~/.conda/envs -EOF - # Activate conda in /etc/bash.bashrc append_to_etc_bashrc "$(cat<< EOF for x in "conda" "mamba"; do From 1ad79b1dc89b248e505adb7e5b8c37abe4b5b94f Mon Sep 17 00:00:00 2001 From: ptaylor Date: Wed, 20 May 2026 12:11:29 -0700 Subject: [PATCH 06/13] CONDA_PKGS_DIRS -> CONDA_PKG_DIRS --- features/src/mambaforge/.bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/src/mambaforge/.bashrc b/features/src/mambaforge/.bashrc index d6b1a5d19..c2c8e5a97 100644 --- a/features/src/mambaforge/.bashrc +++ b/features/src/mambaforge/.bashrc @@ -1,6 +1,6 @@ export MAMBA_NO_BANNER="${MAMBA_NO_BANNER:-1}"; -export CONDA_PKGS_DIRS="${CONDA_PKGS_DIRS:-${HOME}/.conda/pkgs}"; -export MAMBA_PKGS_DIRS="${CONDA_PKGS_DIRS}"; +export CONDA_PKG_DIRS="${CONDA_PKG_DIRS:-${HOME}/.conda/pkgs}"; +export MAMBA_PKG_DIRS="${CONDA_PKG_DIRS}"; # Temporarily allow unbound variables for conda activation. nounseton="$(shopt -o nounset | tr -d '[:blank:]')"; From 96310f0df3d273071fa1b27c909e70dfd29e0c5a Mon Sep 17 00:00:00 2001 From: ptaylor Date: Wed, 20 May 2026 12:43:31 -0700 Subject: [PATCH 07/13] always set MAMBA_ROOT_PREFIX to CONDA_PREFIX --- features/src/mambaforge/install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/features/src/mambaforge/install.sh b/features/src/mambaforge/install.sh index 9df10e999..a412e5e54 100644 --- a/features/src/mambaforge/install.sh +++ b/features/src/mambaforge/install.sh @@ -55,9 +55,10 @@ EOF # Create and/or replace mamba.sh with a version that doesn't print warnings to stdout (https://github.com/mamba-org/mamba/pull/3788) # This also protects us when mamba decides to remove this file, which is a decision that is incompatible with this feature. cat <<"EOF" > /opt/conda/etc/profile.d/mamba.sh -if [ -z "${MAMBA_ROOT_PREFIX:-}" ]; then - export MAMBA_ROOT_PREFIX="${CONDA_PREFIX:-/opt/conda}" -fi +# if [ -z "${MAMBA_ROOT_PREFIX:-}" ]; then +# export MAMBA_ROOT_PREFIX="${CONDA_PREFIX:-/opt/conda}" +# fi +export MAMBA_ROOT_PREFIX="${CONDA_PREFIX:-/opt/conda}" __mamba_setup="$("/opt/conda/bin/mamba" shell hook --shell posix 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__mamba_setup" From 2de660ceefa1c27b7a945d27cb8654d2c3fe8c71 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Wed, 20 May 2026 12:44:42 -0700 Subject: [PATCH 08/13] set both CONDA_PKGS_DIRS and CONDA_PKG_DIRS --- features/src/mambaforge/.bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/src/mambaforge/.bashrc b/features/src/mambaforge/.bashrc index c2c8e5a97..58aa31498 100644 --- a/features/src/mambaforge/.bashrc +++ b/features/src/mambaforge/.bashrc @@ -1,6 +1,6 @@ export MAMBA_NO_BANNER="${MAMBA_NO_BANNER:-1}"; -export CONDA_PKG_DIRS="${CONDA_PKG_DIRS:-${HOME}/.conda/pkgs}"; -export MAMBA_PKG_DIRS="${CONDA_PKG_DIRS}"; +export CONDA_PKGS_DIRS="${CONDA_PKGS_DIRS:-${HOME}/.conda/pkgs}"; +export CONDA_PKG_DIRS="${CONDA_PKGS_DIRS}"; # Temporarily allow unbound variables for conda activation. nounseton="$(shopt -o nounset | tr -d '[:blank:]')"; From 493663cc20cd98b38c59b9e78fd835b4602c572c Mon Sep 17 00:00:00 2001 From: ptaylor Date: Wed, 20 May 2026 12:46:32 -0700 Subject: [PATCH 09/13] set MAMBA_ROOT_PREFIX to ~/.conda --- features/src/mambaforge/.bashrc | 2 -- features/src/mambaforge/install.sh | 5 +---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/features/src/mambaforge/.bashrc b/features/src/mambaforge/.bashrc index 58aa31498..cb4920b7a 100644 --- a/features/src/mambaforge/.bashrc +++ b/features/src/mambaforge/.bashrc @@ -1,6 +1,4 @@ export MAMBA_NO_BANNER="${MAMBA_NO_BANNER:-1}"; -export CONDA_PKGS_DIRS="${CONDA_PKGS_DIRS:-${HOME}/.conda/pkgs}"; -export CONDA_PKG_DIRS="${CONDA_PKGS_DIRS}"; # Temporarily allow unbound variables for conda activation. nounseton="$(shopt -o nounset | tr -d '[:blank:]')"; diff --git a/features/src/mambaforge/install.sh b/features/src/mambaforge/install.sh index a412e5e54..250077190 100644 --- a/features/src/mambaforge/install.sh +++ b/features/src/mambaforge/install.sh @@ -55,10 +55,7 @@ EOF # Create and/or replace mamba.sh with a version that doesn't print warnings to stdout (https://github.com/mamba-org/mamba/pull/3788) # This also protects us when mamba decides to remove this file, which is a decision that is incompatible with this feature. cat <<"EOF" > /opt/conda/etc/profile.d/mamba.sh -# if [ -z "${MAMBA_ROOT_PREFIX:-}" ]; then -# export MAMBA_ROOT_PREFIX="${CONDA_PREFIX:-/opt/conda}" -# fi -export MAMBA_ROOT_PREFIX="${CONDA_PREFIX:-/opt/conda}" +export MAMBA_ROOT_PREFIX="${HOME/.conda}" __mamba_setup="$("/opt/conda/bin/mamba" shell hook --shell posix 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__mamba_setup" From 2e1ac01c677c07e4ad8a21400adcfe272a034625 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Wed, 20 May 2026 12:53:37 -0700 Subject: [PATCH 10/13] temporarily reinstall mambaforge feature in devcontainer --- .devcontainer/cuda12.9-conda/devcontainer.json | 2 ++ .devcontainer/cuda13.2-conda/devcontainer.json | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.devcontainer/cuda12.9-conda/devcontainer.json b/.devcontainer/cuda12.9-conda/devcontainer.json index 218ac598c..e9d72747f 100644 --- a/.devcontainer/cuda12.9-conda/devcontainer.json +++ b/.devcontainer/cuda12.9-conda/devcontainer.json @@ -43,11 +43,13 @@ "installnvJPEG": false, "pruneStaticLibs": true }, + "./features/src/mambaforge": {}, "./features/src/utils": {}, "./features/src/rapids-build-utils": {} }, "overrideFeatureInstallOrder": [ "./features/src/cuda", + "./features/src/mambaforge", "./features/src/utils", "./features/src/rapids-build-utils" ], diff --git a/.devcontainer/cuda13.2-conda/devcontainer.json b/.devcontainer/cuda13.2-conda/devcontainer.json index 14277db84..e9ea42630 100644 --- a/.devcontainer/cuda13.2-conda/devcontainer.json +++ b/.devcontainer/cuda13.2-conda/devcontainer.json @@ -43,11 +43,13 @@ "installnvJPEG": false, "pruneStaticLibs": true }, + "./features/src/mambaforge": {}, "./features/src/utils": {}, "./features/src/rapids-build-utils": {} }, "overrideFeatureInstallOrder": [ "./features/src/cuda", + "./features/src/mambaforge", "./features/src/utils", "./features/src/rapids-build-utils" ], From ed20d43b035b661921b005a99c033ef142467e83 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Wed, 20 May 2026 12:54:58 -0700 Subject: [PATCH 11/13] bump feature versions --- features/src/mambaforge/devcontainer-feature.json | 2 +- features/src/rapids-build-utils/devcontainer-feature.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/features/src/mambaforge/devcontainer-feature.json b/features/src/mambaforge/devcontainer-feature.json index 6e5bc6018..db7e1e0e9 100644 --- a/features/src/mambaforge/devcontainer-feature.json +++ b/features/src/mambaforge/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "Mambaforge", "id": "mambaforge", - "version": "26.8.0", + "version": "26.8.1", "description": "A feature to install mambaforge", "options": { "version": { diff --git a/features/src/rapids-build-utils/devcontainer-feature.json b/features/src/rapids-build-utils/devcontainer-feature.json index 123ea59dc..828b46011 100644 --- a/features/src/rapids-build-utils/devcontainer-feature.json +++ b/features/src/rapids-build-utils/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "NVIDIA RAPIDS devcontainer build utilities", "id": "rapids-build-utils", - "version": "26.8.1", + "version": "26.8.2", "description": "A feature to install the RAPIDS devcontainer build utilities", "containerEnv": { "BASH_ENV": "/etc/bash.bash_env" From 72310b9a5c904074735d9425bf81aba9fa1b4295 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Wed, 20 May 2026 13:34:09 -0700 Subject: [PATCH 12/13] fix typo --- features/src/mambaforge/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/src/mambaforge/install.sh b/features/src/mambaforge/install.sh index 250077190..3089c40b1 100644 --- a/features/src/mambaforge/install.sh +++ b/features/src/mambaforge/install.sh @@ -55,7 +55,7 @@ EOF # Create and/or replace mamba.sh with a version that doesn't print warnings to stdout (https://github.com/mamba-org/mamba/pull/3788) # This also protects us when mamba decides to remove this file, which is a decision that is incompatible with this feature. cat <<"EOF" > /opt/conda/etc/profile.d/mamba.sh -export MAMBA_ROOT_PREFIX="${HOME/.conda}" +export MAMBA_ROOT_PREFIX="${HOME}/.conda" __mamba_setup="$("/opt/conda/bin/mamba" shell hook --shell posix 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__mamba_setup" From f121c81437ca685e8bae2d172ae8eefff651d938 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Wed, 20 May 2026 13:53:23 -0700 Subject: [PATCH 13/13] Revert "temporarily reinstall mambaforge feature in devcontainer" This reverts commit 2e1ac01c677c07e4ad8a21400adcfe272a034625. --- .devcontainer/cuda12.9-conda/devcontainer.json | 2 -- .devcontainer/cuda13.2-conda/devcontainer.json | 2 -- 2 files changed, 4 deletions(-) diff --git a/.devcontainer/cuda12.9-conda/devcontainer.json b/.devcontainer/cuda12.9-conda/devcontainer.json index e9d72747f..218ac598c 100644 --- a/.devcontainer/cuda12.9-conda/devcontainer.json +++ b/.devcontainer/cuda12.9-conda/devcontainer.json @@ -43,13 +43,11 @@ "installnvJPEG": false, "pruneStaticLibs": true }, - "./features/src/mambaforge": {}, "./features/src/utils": {}, "./features/src/rapids-build-utils": {} }, "overrideFeatureInstallOrder": [ "./features/src/cuda", - "./features/src/mambaforge", "./features/src/utils", "./features/src/rapids-build-utils" ], diff --git a/.devcontainer/cuda13.2-conda/devcontainer.json b/.devcontainer/cuda13.2-conda/devcontainer.json index e9ea42630..14277db84 100644 --- a/.devcontainer/cuda13.2-conda/devcontainer.json +++ b/.devcontainer/cuda13.2-conda/devcontainer.json @@ -43,13 +43,11 @@ "installnvJPEG": false, "pruneStaticLibs": true }, - "./features/src/mambaforge": {}, "./features/src/utils": {}, "./features/src/rapids-build-utils": {} }, "overrideFeatureInstallOrder": [ "./features/src/cuda", - "./features/src/mambaforge", "./features/src/utils", "./features/src/rapids-build-utils" ],