jupyter / docker-stacks

Ready-to-run Docker images containing Jupyter applications
https://jupyter-docker-stacks.readthedocs.io
Other
7.93k stars 2.99k forks source link

Docker stacks foundation image build fails with current mamba #2146

Open vizeit opened 3 days ago

vizeit commented 3 days ago

What docker image(s) are you using?

base-notebook, docker-stacks-foundation, minimal-notebook, pytorch-notebook, scipy-notebook

Host OS system

Ubuntu 22.04

Host architecture

x86_64

What Docker command are you running?

Docker build

How to Reproduce the problem?

Build docker stacks foundation image, the build throws an error

Command output

No response

Expected behavior

No response

Actual behavior

build results into the following error,

#15 ERROR: process "/bin/bash -o pipefail -c set -x &&     arch=$(uname -m) &&     if [ \"${arch}\" = \"x86_64\" ]; then         arch=\"64\";     fi &&     wget --progress=dot:giga -O -         \"[https://micro.mamba.pm/api/micromamba/linux-${arch}/latest\](https://micro.mamba.pm/api/micromamba/linux-$%7Barch%7D/latest/)" | tar -xvj bin/micromamba &&     PYTHON_SPECIFIER=\"python=${PYTHON_VERSION}\" &&     if [[ \"${PYTHON_VERSION}\" == \"default\" ]]; then PYTHON_SPECIFIER=\"python\"; fi &&     ./bin/micromamba install         --root-prefix=\"${CONDA_DIR}\"         --prefix=\"${CONDA_DIR}\"         --yes         \"${PYTHON_SPECIFIER}\"         'mamba'         'jupyter_core' &&     rm -rf /tmp/bin/ &&     mamba list --full-name 'python' | tail -1 | tr -s ' ' | cut -d ' ' -f 1,2 | sed 's/\\.[^.]*$/.*/' >> \"${CONDA_DIR}/conda-meta/pinned\" &&     mamba clean --all -f -y &&     fix-permissions \"${CONDA_DIR}\" &&     fix-permissions \"/home/${NB_USER}\"" did not complete successfully: exit code: 109
------
 > [10/14] RUN set -x &&     arch=$(uname -m) &&     if [ "${arch}" = "x86_64" ]; then         arch="64";     fi &&     wget --progress=dot:giga -O -         "[https://micro.mamba.pm/api/micromamba/linux-${arch}/latest](https://micro.mamba.pm/api/micromamba/linux-$%7Barch%7D/latest)" | tar -xvj bin/micromamba &&     PYTHON_SPECIFIER="python=3.11" &&     if [[ "3.11" == "default" ]]; then PYTHON_SPECIFIER="python"; fi &&     ./bin/micromamba install         --root-prefix="/opt/conda"         --prefix="/opt/conda"         --yes         "${PYTHON_SPECIFIER}"         'mamba'         'jupyter_core' &&     rm -rf /tmp/bin/ &&     mamba list --full-name 'python' | tail -1 | tr -s ' ' | cut -d ' ' -f 1,2 | sed 's/\.[^.]*$/.*/' >> "/opt/conda/conda-meta/pinned" &&     mamba clean --all -f -y &&     fix-permissions "/opt/conda" &&     fix-permissions "/home/jovyan":
16.42     micromamba run -n base mycommand
16.42 
16.43 + rm -rf /tmp/bin/
16.44 + mamba list --full-name python
16.44 + tail -1
16.44 + tr -s ' '
16.44 + cut -d ' ' -f 1,2
16.44 + sed 's/\.[^.]*$/.*/'
16.45 The following argument was not expected: --full-name
16.45 Run with --help for more information.
------
Dockerfile:104
--------------------
 103 |     WORKDIR /tmp
 104 | >>> RUN set -x && \
 105 | >>>     arch=$(uname -m) && \
 106 | >>>     if [ "${arch}" = "x86_64" ]; then \
 107 | >>>         # Should be simpler, see <https://github.com/mamba-org/mamba/issues/1437>
 108 | >>>         arch="64"; \
 109 | >>>     fi && \
 110 | >>>     # https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html#linux-and-macos
 111 | >>>     wget --progress=dot:giga -O - \
 112 | >>>         "[https://micro.mamba.pm/api/micromamba/linux-${arch}/latest](https://micro.mamba.pm/api/micromamba/linux-$%7Barch%7D/latest)" | tar -xvj bin/micromamba && \
 113 | >>>     PYTHON_SPECIFIER="python=${PYTHON_VERSION}" && \
 114 | >>>     if [[ "${PYTHON_VERSION}" == "default" ]]; then PYTHON_SPECIFIER="python"; fi && \
 115 | >>>     # Install the packages
 116 | >>>     ./bin/micromamba install \
 117 | >>>         --root-prefix="${CONDA_DIR}" \
 118 | >>>         --prefix="${CONDA_DIR}" \
 119 | >>>         --yes \
 120 | >>>         "${PYTHON_SPECIFIER}" \
 121 | >>>         'mamba' \
 122 | >>>         'jupyter_core' && \
 123 | >>>     rm -rf /tmp/bin/ && \
 124 | >>>     # Pin major.minor version of python
 125 | >>>     # https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#preventing-packages-from-updating-pinning
 126 | >>>     mamba list --full-name 'python' | tail -1 | tr -s ' ' | cut -d ' ' -f 1,2 | sed 's/\.[^.]*$/.*/' >> "${CONDA_DIR}/conda-meta/pinned" && \
 127 | >>>     mamba clean --all -f -y && \
 128 | >>>     fix-permissions "${CONDA_DIR}" && \
 129 | >>>     fix-permissions "/home/${NB_USER}"
 130 |     
--------------------
ERROR: failed to solve: process "/bin/bash -o pipefail -c set -x &&     arch=$(uname -m) &&     if [ \"${arch}\" = \"x86_64\" ]; then         arch=\"64\";     fi &&     wget --progress=dot:giga -O -         \"[https://micro.mamba.pm/api/micromamba/linux-${arch}/latest\](https://micro.mamba.pm/api/micromamba/linux-$%7Barch%7D/latest/)" | tar -xvj bin/micromamba &&     PYTHON_SPECIFIER=\"python=${PYTHON_VERSION}\" &&     if [[ \"${PYTHON_VERSION}\" == \"default\" ]]; then PYTHON_SPECIFIER=\"python\"; fi &&     ./bin/micromamba install         --root-prefix=\"${CONDA_DIR}\"         --prefix=\"${CONDA_DIR}\"         --yes         \"${PYTHON_SPECIFIER}\"         'mamba'         'jupyter_core' &&     rm -rf /tmp/bin/ &&     mamba list --full-name 'python' | tail -1 | tr -s ' ' | cut -d ' ' -f 1,2 | sed 's/\\.[^.]*$/.*/' >> \"${CONDA_DIR}/conda-meta/pinned\" &&     mamba clean --all -f -y &&     fix-permissions \"${CONDA_DIR}\" &&     fix-permissions \"/home/${NB_USER}\"" did not complete successfully: exit code: 109

Anything else?

No response

Latest Docker version

jabbera commented 3 days ago

+1 here.

jabbera commented 3 days ago

I added the following to my build script to work around it. I'm hoping I don't also have to pin it.

sed -i "s/latest/1.5.10/g" ./docker-stacks/docker-stacks-foundation/Dockerfile sed -i "s/'mamba' /'mamba==1.5.10' /g" ./docker-stacks/docker-stacks-foundation/Dockerfile

manics commented 3 days ago

Mamba 2.0.0 has just been released. @jjerphan is the failure above

mamba list --full-name python

The following argument was not expected: --full-name

expected?

JohanMabille commented 2 days ago

It's a regression, we are working on a fix.

ktaletsk commented 2 days ago

It would be a good practice to pin micromamba version, regardless of the fix