Miniforge#

Miniforge contains minimal versions of the conda and mamba environment and package managers, with specificity to conda-forge. It allows users to create and manage virtual environments with packages from the conda-forge repository. Documentation for the conda-forge project is available here and a reference for the conda package manager is here.

Note

This page provides a general reference for miniforge, including commands and job examples. However, users should consult the dependency management section for guidelines and policy on how conda environments should be managed on Aire.

Available versions on Aire#

Version

Load Command

24.7.1

module load miniforge/24.7.1

Creating a new environment#

To create an environment from a pre-defined .yml file, use the following command:

conda env create -f environment.yml

Please see the creating environments section of the dependency management article for further instructions and advice on how to create conda environments using miniforge.

Activating an environment#

To activate an environment (myenv, in this example), use the following command:

conda activate myenv

Deactivating an environment#

To deactivate an environment, use the following command:

conda deactivate myenv

Submitting a job with Miniforge#

The below job script requests 8 CPU cores for a Python script run within the conda environment myenv.

#!/bin/bash
#SBATCH --job-name=miniforge_job
#SBATCH --output=output_%j.out
#SBATCH --error=error_%j.err
#SBATCH --time=01:00:00
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=8

module load miniforge/24.7.1
conda activate myenv

# Run your application
python my_script.py