

This isn’t bad, but it isn’t quite as exciting as the speed-up from switching to Mamba in the first place: So it looks like using the Docker base image with Mamba pre-installed saves us about 25 seconds. $ time docker build -q -no-cache -f Dockerfile.just-mamba. Looking back at the Dockerfile using mamba above, it still has one caveat: Speeding up Docker builds a little bit more Optionally, comes pre-packaged with Mamba.Uses conda-forge as the default channel, instead of Anaconda’s commercially supported default channel.If you’re setting up a new development machine, and you’re primarily using Conda-Forge, there is an another option.Ĭonda-Forge provides an alternative to the normal miniconda installer.If this is your development machine, you’ll want to do conda install mamba -n base -c conda-forge so it’s available in all environments.You can install Mamba into a specific Conda environment as we did above, with conda install -c conda-forge mamba.Mamba has been in development since March 2019, has had 1.5 million downloads since then, and at least in my testing of environment creation seems to work just fine.

That’s true in general, and you can use Mamba for all your other Conda environment interactions. If you look back at the two Dockerfiles above, you’ll notice that once Mamba was installed, all you had to was replace conda with mamba in the command-line. Backwards compatible, with the same command-line options.Mamba is a re-implementation of the Conda package manager, designed to be: Need to ship quickly, and don’t have time to figure out every detail on your own? Read the concise, action-oriented Python on Docker Production Handbook. Note: Outside any specific best practice being demonstrated, the Dockerfiles in this article are not examples of best practices, since the added complexity would obscure the main point of the article.

Much of that is due to less CPU usage, but even network downloads seem to be little faster Mamba uses parallel downloads to speed them up. Mamba installs these packages in only a third of the time that Conda does.
