Docker-stacks: Add mamba to base-notebook?

Created on 14 Jan 2021  路  4Comments  路  Source: jupyter/docker-stacks

Thanks for maintaining these images!

Does it make sense to add mamba to the base-notebook image? https://github.com/jupyter/docker-stacks/blob/703d8b2dcb886be2fe5aa4660a48fbcef647e7aa/base-notebook/Dockerfile#L133-L137
It speeds up installation of conda packages and docker build time significantly downstream, some rudimentary tests on scipy-notebook makes the build 2x faster using mamba install instead of conda install.

Most helpful comment

@MridulS thank you.
Yes it could be an option especially since we have recently switched to miniforge and mamba is already shipped with one of the installer flavor Mambaforge-Linux-x86_64.sh. So installing it will just be a matter of changing the ARGs in the Dockerfile and then calling mamba instead of conda for packages installation.

https://github.com/jupyter/docker-stacks/blob/703d8b2dcb886be2fe5aa4660a48fbcef647e7aa/base-notebook/Dockerfile#L25-L34

The only drawback is that it will make the images heavier (don't know exactly, but maybe something like +50MB).
The build time improvement is a positive point however I think the main benefit will be for the users who want to install additional packages. So to conclude, I am in favor of this 馃憤 .
However, this is only my opinion and I would like to hear from other people before launching a PR.

All 4 comments

@MridulS thank you.
Yes it could be an option especially since we have recently switched to miniforge and mamba is already shipped with one of the installer flavor Mambaforge-Linux-x86_64.sh. So installing it will just be a matter of changing the ARGs in the Dockerfile and then calling mamba instead of conda for packages installation.

https://github.com/jupyter/docker-stacks/blob/703d8b2dcb886be2fe5aa4660a48fbcef647e7aa/base-notebook/Dockerfile#L25-L34

The only drawback is that it will make the images heavier (don't know exactly, but maybe something like +50MB).
The build time improvement is a positive point however I think the main benefit will be for the users who want to install additional packages. So to conclude, I am in favor of this 馃憤 .
However, this is only my opinion and I would like to hear from other people before launching a PR.

I think, having much faster builds sounds great 馃憤

I think we should try to compare the build time using regular conda and using mamba for some heavy image like tensorflow-notebook. And compare sizes of the resulting images.
@MridulS could you please share this information with us?
Maybe you can draft a PR with the changes you made so we can see the amount of diff to enable mamba?

If the difference in time is quite big, and size difference is about 50MB, then I think it's awesome.

Things we should consider:

  • does mamba use the same folders for cache?
  • do we have to call mamba clean, or should it be conda clean to remove all the cache?
  • does it work well with R packages, because we have R notebook?

Let's try it -> #1213 馃槃

Hello,

We have a first result summarized in this comment.

  • Build time: no improvement
  • Size: +20MB for most images. But some weird results on several images ending with images built by mamba lighter than images build by conda especially images with R packages . We have to understand the reason, because we are not confident and our fear is to build inconsistent images.

So, in conclusion, and while waiting for an explanation on the difference in image size, we saw no major interest in using mamba. We could decide to install mamba but it is unlikely that we will use it to build the stacks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

akhmerov picture akhmerov  路  4Comments

aar0nTw picture aar0nTw  路  4Comments

ainiml picture ainiml  路  3Comments

codingbutstillalive picture codingbutstillalive  路  3Comments

iyanmv picture iyanmv  路  4Comments