
It’s a whole lot faster-with the same functionality.
CONDA INSTALL PACKAGE INCONSISTENT INSTALL
Whether developing on your machine or packaging with Docker, you should use Mamba to install your Conda packages. In the context of Docker builds, the fixed cost of RUN conda install -c conda-forge mamba will go away after the first build if you’re using Docker layer caching, which you should be.On your development computer, you can just have Mamba installed in the base environment (see above), so there isn’t really much savings.Unlike the speedup from switching, which will probably scale at least somewhat with number of packages, this is a fixed overhead: you’re just saving the one-time RUN conda install -c conda-forge mamba.
CONDA INSTALL PACKAGE INCONSISTENT SOFTWARE
Packages are bundles of software and supporting files stored in any of a variety of repositories called channels. This isn’t bad, but it isn’t quite as exciting as the speed-up from switching to Mamba in the first place: Conda is a platform-independent package manager application that can install, update, and remove Python packages. 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

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. conda-forge-repodata-patches public generate tweaks to index metadata, hosted separately from index cachedpath public A file utility for accessing both local and remote files through a unified 2022-02. Backwards compatible, with the same command-line options.Mamba is a re-implementation of the Conda package manager, designed to be: Make sure your production software is packaged securely, efficiently, and quickly: Read the pragmatic, thorough, and concise 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.
