PR review comments: update micromamba, use MAMBA_EXE environment variable
MODIFY
repo2docker/buildpacks/conda/__init__.py
repo2docker/buildpacks/conda/__init__.py
@@ -339,9 +339,9 @@ class CondaBuildPack(BaseImage):
"${NB_USER}",
r"""
TIMEFORMAT='time: %3R' \
- bash -c 'time /tmp/bin/micromamba install -p {0} -f "{1}" && \
- # time /tmp/bin/micromamba clean --all -y && \
- /tmp/bin/micromamba list -p {0} \
+ bash -c 'time ${{MAMBA_EXE}} install -p {0} -f "{1}" && \
+ # time ${{MAMBA_EXE}} clean --all -y && \
+ ${{MAMBA_EXE}} list -p {0} \
'
""".format(
env_prefix, environment_yml
@@ -358,9 +358,9 @@ class CondaBuildPack(BaseImage):
(
"${NB_USER}",
r"""
- /tmp/bin/micromamba install -p {0} r-base{1} r-irkernel={2} r-devtools -y && \
- # /tmp/bin/micromamba clean --all -f -y && \
- /tmp/bin/micromamba list -p {0}
+ ${{MAMBA_EXE}} install -p {0} r-base{1} r-irkernel=1.2 r-devtools -y && \
+ # ${{MAMBA_EXE}} clean --all -f -y && \
+ ${{MAMBA_EXE}} list -p {0}
""".format(
env_prefix, r_pin
),

MODIFY
repo2docker/buildpacks/conda/install-base-env.bash
repo2docker/buildpacks/conda/install-base-env.bash
# and sets up the base environment
set -ex
-
cd $(dirname $0)
-URL="https://anaconda.org/conda-forge/micromamba/0.17.0/download/linux-64/micromamba-0.17.0-0.tar.bz2"
+export MAMBA_VERSION=0.19.1
+export CONDA_VERSION=4.11.0
+
+URL="https://anaconda.org/conda-forge/micromamba/${MAMBA_VERSION}/download/linux-64/micromamba-${MAMBA_VERSION}-0.tar.bz2"
# make sure we don't do anything funky with user's $HOME
# since this is run as root
@@ -35,7 +37,7 @@ update_dependencies: false
# channel_priority: flexible
EOT
-micromamba install conda mamba -y
+micromamba install conda=${CONDA_VERSION} mamba=${MAMBA_VERSION} -y
echo "installing notebook env:"
cat "${NB_ENVIRONMENT_FILE}"

MODIFY
tests/conda/binder-dir/verify
tests/conda/binder-dir/verify
@@ -5,6 +5,17 @@ from subprocess import check_output
assert sys.version_info[:2] == (3, 5), sys.version
out = check_output(["/tmp/bin/micromamba", "--version"]).decode("utf8").strip()
-assert out == "0.17.0", out
+assert (
+ out
+ == """micromamba: 0.19.1
+libmamba: 0.19.1"""
+), out
+
+out = check_output(["mamba", "--version"]).decode("utf8").strip()
+assert (
+ out
+ == """mamba 0.19.1
+conda 4.11.0"""
+), out
import numpy

MODIFY
tests/conda/default-env/postBuild
tests/conda/default-env/postBuild
#!/bin/bash
# install pytest with conda in the default env (should be $KERNEL_PYTHON_PREFIX)
-/tmp/bin/micromamba install -yq pytest -p $KERNEL_PYTHON_PREFIX
+conda install -yq pytest
# install there with pip (should be the same)
pip install there

PR review comments: update micromamba, use MAMBA_EXE environment variable