jupyter / docker-stacks

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

Install mamba 2.0 #2147

Open mathbunnyru opened 1 month ago

mathbunnyru commented 1 month ago

Describe your changes

Issue ticket if applicable

Fix: https://github.com/jupyter/docker-stacks/issues/2146

Checklist (especially for first-time contributors)

mathbunnyru commented 1 month ago

The following argument was not expected: --no-builds

We use it here: https://github.com/jupyter/docker-stacks/blob/55ea74f89f7a8e65f27cab87fd8340b25a5a14e5/tests/package_helper.py#L64

@JohanMabille I created an upstream issue: https://github.com/mamba-org/mamba/issues/3492

UPDATE: I fixed this one by not using --json and using --no-build flag, which works for both v1 and v2

mathbunnyru commented 1 month ago

Also: bash: line 1: conda: command not found

It seems that conda executable is now missing

I don't know if this is expected or not and the best way to fix this.

mathbunnyru commented 1 month ago

Fixed this issue with the output of mamba list --full-name (it now works in mamba v2, but the output format has slightly changed, not a bug). Also fixed an issue with mamba env export (reported to the upstream, but we no longer need it to be fixed). And I did it in a way that works with both mamba v1 and v2.

The only remaining issue is with the missing conda executable. We use it like this in 2 places: eval "$(conda shell.bash hook)". As far as I see, the conda package is no longer installed when installing mamba, and that's why executable is missing. And if I try to install it manually, it downgrades mamba to v1.

We can try to switch to eval "$(mamba shell hook)", but this is not something I would really like to do:

  1. I assume many of our users have conda install/activate commands in the images based on our images. Not having a conda executable will break them.
  2. We have some documentation ourselves suggesting using conda - this will also silently break.
  3. mamba shell hook doesn't exist in mamba v1, as far as I understand. This means we will make it difficult for users who fork our repo to stay with mamba v1 if they are not ready to upgrade yet.

So, we should probably wait till we can install both conda and mamba v2 simultaneously.

jjerphan commented 1 month ago

Hi Ayaz,

Regarding failing update due to conda, you might want to track https://github.com/mamba-org/mamba/issues/3503.

flaviomartins commented 3 weeks ago

Hi Ayaz,

Regarding failing update due to conda, you might want to track mamba-org/mamba#3503.

There is an RC now https://github.com/mamba-org/mamba/issues/3503#issuecomment-2455537329

mathbunnyru commented 3 weeks ago

Hi Ayaz, Regarding failing update due to conda, you might want to track mamba-org/mamba#3503.

There is an RC now mamba-org/mamba#3503 (comment)

Thanks, I saw that as well yesterday. Hope it won't be too long before release.

jjerphan commented 1 day ago

The failure is due to conda being absent since mamba 2.0 does not depend on it.

For now conda and mamba 2.0 cannot be installed in the same environment, but soon will be installable (for some context, see https://github.com/mamba-org/mamba/issues/3503#issuecomment-2397281920).

mathbunnyru commented 1 day ago

Yes, waiting for the new conda-libmamba-solver to be released!