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

Docker stacks foundation image build fails with current mamba #2146

Open
1 task done
vizeit opened this issue Sep 25, 2024 · 9 comments · May be fixed by #2147
Open
1 task done

Docker stacks foundation image build fails with current mamba #2146

vizeit opened this issue Sep 25, 2024 · 9 comments · May be fixed by #2147
Labels
type:Bug A problem with the definition of one of the docker images maintained here

Comments

@vizeit
Copy link

vizeit commented Sep 25, 2024

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

  • I've updated my Docker version to the latest available, and the issue persists
@vizeit vizeit added the type:Bug A problem with the definition of one of the docker images maintained here label Sep 25, 2024
@vizeit vizeit changed the title Docker stacks foundation image build fails with current micromamba Docker stacks foundation image build fails with current mamba Sep 25, 2024
@jabbera
Copy link

jabbera commented Sep 26, 2024

+1 here.

@jabbera
Copy link

jabbera commented Sep 26, 2024

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
Copy link
Contributor

manics commented Sep 26, 2024

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
Copy link
Member

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

@ktaletsk
Copy link

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

@mathbunnyru
Copy link
Member

mathbunnyru commented Sep 30, 2024

I pushed a fix preventing mamba 2.0.0 from installing.
Hope next release will solve the problem and I will revert my change.

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

Note: the error on our side occurs with mamba, not micromamba during mamba list --full-name 'python'

Pinning micromamba version would not have helped here, as far as I understand: the error is caused by mamba, and the latest mamba would have still been installed, regardless of micromamba version.

Pinning mamba version is also not something I would like to do - I prefer this repo to have unpinned versions for almost everything, and it works well - people eventually get the latest versions of software they use, and maintenance is much easier as well.
And if something breaks, it breaks fast, and we should let developers of upstream packages know about failures faster - it makes these bugs easier to track and fix.

@jabbera
Copy link

jabbera commented Sep 30, 2024

Pinning micromamba version would not have helped here, as far as I understand: the error is caused by mamba, and the latest mamba would have still been installed, regardless of micromamba version.

You are correct.

@JohanMabille
Copy link
Member

We have released micromamba 2.0.2 which should fix this issue, can you confirm it does?

@mathbunnyru
Copy link
Member

mathbunnyru commented Oct 3, 2024

We have released micromamba 2.0.2 which should fix this issue, can you confirm it does?

The --full-name issue has been fixed, I confirm.

There are still remaining issues with mamba v2, which prevent us from updating, please, take a look here: #2147
The main one is not being able to use conda when mamba v2 is installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Bug A problem with the definition of one of the docker images maintained here
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants