micromamba
works in the bash & zsh shell on Linux & OS X.
It's completely statically linked, which allows you to drop it in a compatible Linux or OS X and just execute it.
Download and unzip the executable (from the official conda-forge package):
wget -qO- https://micromamba.snakepit.net/api/micromamba/linux-64/latest | tar -xvj bin/micromamba --strip-components=1
We can use ./micromamba shell init ...
to initialize a shell (.bashrc
) and a new root environment:
./micromamba shell init -s bash -p ~/micromamba
source ~/.bashrc
Now you can activate the base environment and install new packages, or create other environments.
micromamba activate
micromamba install python=3.6 jupyter -c conda-forge
micromamba create -p /some/new/prefix xtensor -c conda-forge
Micromamba has OS X support as well. Instructions are largely the same:
curl -Ls https://micromamba.snakepit.net/api/micromamba/osx-64/latest | tar -xvj bin/micromamba
mv bin/micromamba ./micromamba
./micromamba shell init -s zsh -p ~/micromamba
source ~/.zshrc
micromamba activate
micromamba install python=3.6 jupyter -c conda-forge
There are packages for micromamba available for ARM 64 and PPC. Just use the Linux instructions and exchange the package with the one found on anaconda.org.
Micromamba also has Windows support! For Windows, we recommend powershell. Below are the commands to get micromamba installed.
Invoke-Webrequest -URI https://micromamba.snakepit.net/api/micromamba/win-64/latest -OutFile micromamba.tar.bz2
C:\PROGRA~1\7-Zip\7z.exe x micromamba.tar.bz2 -aoa
C:\PROGRA~1\7-Zip\7z.exe x micromamba.tar -ttar -aoa -r Library\bin\micromamba.exe
$Env:MAMBA_ROOT_PREFIX=(Join-Path -Path $HOME -ChildPath micromamba)
$Env:MAMBA_EXE=(Join-Path -Path (Get-Location) -ChildPath micromamba.exe)
.\micromamba.exe create -f ./test/env_win.yaml -y
We should soon figure out an automated process to use the latest version of micromamba. We can use the anaconda api: https://api.anaconda.org/release/conda-forge/micromamba/latest to find all the latest packages, we just need to select the one for the right platform.
Hi, for anybody coming here looking for a basic dockerfile installing micromamba, the following is a minimal setup making micromamba available in each layer and the resulting image:
I would have loved to use this in our builds, but unless I'm missing something, micromamba is still missing crucial conda feautures (some of which are also not supported by mamba afaik), such as pinned specs, configuration of channel priority, the equivalent of
conda env update -f req.yml
with pip support etc.Edit: I've added some commands to cleanup in each layer, reducing the resulting image size from ~600MB to ~230MB. A
micromamba clean
command would be a good addition.