Skip to content

Commit 42df755

Browse files
committed
test: Use 2.0.7.rc0
Signed-off-by: Julien Jerphanion <[email protected]>
1 parent 17a23c4 commit 42df755

File tree

3 files changed

+28
-12
lines changed

3 files changed

+28
-12
lines changed

repo2docker/buildpacks/conda/activate-conda.sh

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
1-
# enable conda and activate the notebook environment
2-
set -e
1+
set -ex
2+
3+
# Setup conda
4+
CONDA_PROFILE="${CONDA_DIR}/etc/profile.d/conda.sh"
5+
echo "Activating profile: ${CONDA_PROFILE}"
6+
test -f $CONDA_PROFILE && . $CONDA_PROFILE
7+
8+
# Setup micromamba
39
eval $(micromamba shell hook -s posix -r ${CONDA_DIR})
4-
for name in conda mamba; do
5-
CONDA_PROFILE="${CONDA_DIR}/etc/profile.d/${name}.sh"
6-
echo "Activating profile: ${CONDA_PROFILE}"
7-
test -f $CONDA_PROFILE && . $CONDA_PROFILE
8-
done
10+
11+
# Setup mamba
12+
export MAMBA_ROOT_PREFIX="${CONDA_DIR}"
13+
__mamba_setup="$("${CONDA_DIR}/bin/mamba" shell hook --shell posix 2> /dev/null)"
14+
if [ $? -eq 0 ]; then
15+
eval "$__mamba_setup"
16+
else
17+
alias mamba="${CONDA_DIR}/bin/mamba" # Fallback on help from mamba activate
18+
fi
19+
unset __mamba_setup
20+
21+
# Activate the environment
922
if [[ "${KERNEL_PYTHON_PREFIX}" != "${NB_PYTHON_PREFIX}" ]]; then
1023
# if the kernel is a separate env, stack them
1124
# so both are on PATH, notebook first
@@ -22,4 +35,4 @@ else
2235
mamba activate ${NB_PYTHON_PREFIX}
2336
fi
2437

25-
set +e
38+
set +ex

repo2docker/buildpacks/conda/install-base-env.bash

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -ex
55

66
cd $(dirname $0)
77

8-
export MAMBA_VERSION="2.0.5"
8+
export MAMBA_VERSION="2.0.7.rc0"
99
export CONDA_VERSION=24.11.0
1010

1111
URL="https://anaconda.org/conda-forge/micromamba/${MAMBA_VERSION}/download/${CONDA_PLATFORM}/micromamba-${MAMBA_VERSION}-0.tar.bz2"
@@ -36,7 +36,10 @@ update_dependencies: false
3636
# channel_priority: flexible
3737
EOT
3838

39-
micromamba install conda=${CONDA_VERSION} mamba=${MAMBA_VERSION} -y
39+
micromamba install \
40+
-c conda-forge/label/mamba_prerelease \
41+
-c conda-forge \
42+
conda=${CONDA_VERSION} mamba=${MAMBA_VERSION} -y
4043

4144
echo "installing notebook env:"
4245
cat "${NB_ENVIRONMENT_FILE}"

tests/conda/py35-binder-dir/verify

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ v = out.split()[1]
1616
assert v[:3] == "3.5", out
1717

1818
out = sh(["micromamba", "--version"])
19-
assert out == "2.0.5", out
19+
assert out == "2.0.7.rc0", out
2020

2121
out = sh(["mamba", "--version"])
22-
assert out == "2.0.5", out
22+
assert out == "2.0.7.rc0", out
2323

2424

2525
sh([kernel_python, "-c", "import numpy"])

0 commit comments

Comments
 (0)