I want to install Mamba on a HPC, and when you go through the normal installation procedure, it will be installed in the $HOME directory.
$ curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
$ bash Miniforge3-$(uname)-$(uname -m).sh
After installation:
(base) [user@login-p-1 ~]$ which mamba
~/mambaforge/bin/mamba
(base) [user@login-p-1 ~]$
Is there a way to set the installation directory manually? On our HPC system, the $HOME directory is limited to 50 GB, which is not sufficient when installing multiple Mamba environments.
As mentioned in the comments, this may not always be advisable. But to answer your question, yes it is possible to install it in a different directory. When you run the script, it asks you where you want to install it, with the default being your home.
For example, let's say that rather than default location, I wanted to install it in a directory called ~/scratch/miniforge3
.
When the installation script runs, I can specify this directory when asked:
Miniforge3 will now be installed into this location:
/home/hugot/miniforge3
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
[/home/hugot/miniforge3] >>> /home/hugot/scratch/miniforge3
Now your mamba
will be in that directory.
Alternatively, you can do this directly with the installation script. You can see the help of the installation script with:
bash Miniforge3-$(uname)-$(uname -m).sh -h
Which says:
-p PREFIX install prefix, defaults to /home/hugot/miniforge3, must not contain spaces.
For our example above, we could therefore run the script as:
bash Miniforge3-$(uname)-$(uname -m).sh -p ~/scratch