mamba header image

What is Mamba?

In a nutshell, Mamba is simply a recoding of Conda in C++ for massive performance gains.

It features several design choices that speed up the process of creating environments or installing packages such as:

  • parallel downloading of repository data and package files using multi-threading
  • faster dependency solving vis libsolv
  • C++ efficiency

You can learn more by reading Mamba's GitHub: https://github.com/mamba-org/mamba or the full documentation: https://mamba.readthedocs.io/en/latest/index.html

Why use Mamba over Conda?

In addition to much faster installation times, mamba utilizes the same command line parser, package installation and deinstallation code, and transaction verification routines as Conda to maximize compatibility. 

In other words, Mamba is just faster Conda with some cool added utilities and improvements.

Why was Mamba made?

The primary motivation for creating Mamba was to solve the two major performance issues of conda, namely speed and memory usage. 

How do I use Mamba on GRACE?

We have added an executable binary on GRACE in /usr/local/bin which should automatically be in your $PATH variable. Assuming that the directory for mamba is in your $PATH variable, use mamba as you would conda:

mamba create -n xtensor_env xtensor -c conda-forge


The version of Mamba running on GRACE expects the bash variable $MAMBA_ROOT_PREFIX to be set to the same place as your default conda directory. By default this location is ~/.conda but you might need to set it to something else if you decide to use your own personal copy of conda instead of the admin maintained conda instance. 

If you are running Mamba for the first time, you likely will need to run the following command to have Mamba work correctly:

echo "export MAMBA_ROOT_PREFIX='~/.conda/'" >> ~/.bashrc

What version of Mamba is available on GRACE?

The full version of Mamba installs a version of python automatically. This could potentially break the base environment if added to the admin maintained base conda environment. To mitigate this issue, we have chosen to utilize Micromamba to quickly enable our HPC users to use mamba as a drop in replacement for conda. 

Micromamba is a pure C++ executable binary and is maintained by the same team as Mamba. Since Micromamba does not depend on python to function, it can be used seamlessly as a drop in replacement for conda. In addition, due to the use of a single binary upgrading Mamba will be seamless as new versions are released. 

  • No labels