Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Use mamba 2.0.6.rc3 #1404

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions repo2docker/buildpacks/conda/activate-conda.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
# enable conda and activate the notebook environment
set -ex

# Setup conda
CONDA_PROFILE="${CONDA_DIR}/etc/profile.d/conda.sh"
echo "Activating profile: ${CONDA_PROFILE}"
test -f $CONDA_PROFILE && . $CONDA_PROFILE

# Setup micromamba
eval $(micromamba shell hook -s posix -r ${CONDA_DIR})
for name in conda mamba; do
CONDA_PROFILE="${CONDA_DIR}/etc/profile.d/${name}.sh"
echo "Activating profile: ${CONDA_PROFILE}"
test -f $CONDA_PROFILE && . $CONDA_PROFILE
done

# Setup mamba
export MAMBA_ROOT_PREFIX="${CONDA_DIR}"
__mamba_setup="$("${CONDA_DIR}/bin/mamba" shell hook --shell posix 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__mamba_setup"
else
alias mamba="${CONDA_DIR}/bin/mamba" # Fallback on help from mamba activate
fi
unset __mamba_setup

# Activate the environment
if [[ "${KERNEL_PYTHON_PREFIX}" != "${NB_PYTHON_PREFIX}" ]]; then
# if the kernel is a separate env, stack them
# so both are on PATH, notebook first
Expand Down
7 changes: 5 additions & 2 deletions repo2docker/buildpacks/conda/install-base-env.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -ex

cd $(dirname $0)

export MAMBA_VERSION="2.0.5"
export MAMBA_VERSION="2.0.6.rc3"
export CONDA_VERSION=24.11.0

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

micromamba install conda=${CONDA_VERSION} mamba=${MAMBA_VERSION} -y
micromamba install \
-c conda-forge/label/mamba_prerelease \
-c conda-forge \
conda=${CONDA_VERSION} mamba=${MAMBA_VERSION} -y

echo "installing notebook env:"
cat "${NB_ENVIRONMENT_FILE}"
Expand Down
4 changes: 2 additions & 2 deletions tests/conda/py35-binder-dir/verify
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ v = out.split()[1]
assert v[:3] == "3.5", out

out = sh(["micromamba", "--version"])
assert out == "2.0.5", out
assert out == "2.0.6.rc3", out

out = sh(["mamba", "--version"])
assert out == "2.0.5", out
assert out == "2.0.6.rc3", out


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