kopia lustrzana https://github.com/jupyterhub/repo2docker
PR review comments: update micromamba, use MAMBA_EXE environment variable
rodzic
374efff3dc
commit
65a36cc3f7
|
@ -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
|
||||
),
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
# 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}"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/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
|
||||
|
|
Ładowanie…
Reference in New Issue