diff --git a/features/src/mambaforge/.bashrc b/features/src/mambaforge/.bashrc index 24df8f59..cb4920b7 100644 --- a/features/src/mambaforge/.bashrc +++ b/features/src/mambaforge/.bashrc @@ -3,7 +3,7 @@ export MAMBA_NO_BANNER="${MAMBA_NO_BANNER:-1}"; # 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/mambaforge/devcontainer-feature.json b/features/src/mambaforge/devcontainer-feature.json index 6e5bc601..db7e1e0e 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/mambaforge/install.sh b/features/src/mambaforge/install.sh index 9df10e99..3089c40b 100644 --- a/features/src/mambaforge/install.sh +++ b/features/src/mambaforge/install.sh @@ -55,9 +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="${HOME}/.conda" __mamba_setup="$("/opt/conda/bin/mamba" shell hook --shell posix 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__mamba_setup" diff --git a/features/src/rapids-build-utils/.bashrc b/features/src/rapids-build-utils/.bashrc index b1f7ce65..49db66db 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}"; diff --git a/features/src/rapids-build-utils/devcontainer-feature.json b/features/src/rapids-build-utils/devcontainer-feature.json index 123ea59d..828b4601 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" 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 0a5b5e59..d6359cf2 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}";