Environment Setup#
Install a Conda-compatible environment manager before building MPPT. MPPT does
not install one itself. Miniforge is the recommended bootstrap because it
uses conda-forge by default, provides the familiar conda command plus
mamba, and its current Linux installers support glibc >= 2.17.
The command names are not interchangeable. Miniforge provides both conda and
mamba; Miniconda and Anaconda Distribution provide conda; Micromamba
provides only micromamba. The recommended MPPT instructions use conda from
Miniforge. Manager-specific environment commands are listed below.
This page covers Linux installations without administrator privileges. The official upstream guides remain the source of truth for current installers:
Check The Server#
Run these commands before downloading an installer:
uname -m
getconf GNU_LIBC_VERSION
command -v conda || command -v mamba || command -v micromamba
command -v curl
command -v git
command -v tar
The supplied mppt_env.yaml targets Linux x86-64 and the current package set
requires glibc >= 2.17. An x86_64 server with glibc 2.17, such as CentOS 7
or RHEL 7, can use current Miniforge even though the latest Miniconda Linux
installer cannot.
Host |
Bootstrap choice |
Action |
|---|---|---|
|
Existing manager |
Continue below to Create The MPPT Environment. |
|
Miniforge |
Use the recommended installation below and the familiar |
Minimal |
Micromamba |
Install the standalone binary in |
|
Miniconda |
Use the official latest installer and |
Linux architecture other than |
Architecture-matched manager plus a custom MPPT environment |
The supplied environment and compiler commands cannot be used unchanged. |
|
Container or newer OS |
The current MPPT environment is not supported on the host userspace. |
The installer compatibility boundary and the MPPT environment compatibility
boundary are separate. Miniforge 24.3.0-0 can bootstrap on glibc 2.12-2.16,
but that does not make the current MPPT package set compatible with those
systems. Use Apptainer/Singularity or ask the administrator for a newer runtime
instead of replacing the host glibc. This repository does not currently provide
a validated general-purpose MPPT container image.
Recommended: Install Miniforge#
Download and run the installer from the home directory. Calling it through
bash does not require the installer file to be executable and avoids directly
executing it from a noexec filesystem. The final installation prefix, such as
$HOME/miniforge3, must still permit executable files.
Do not install the retired Mambaforge distribution. Miniforge already includes both Conda and Mamba.
cd "$HOME"
MINIFORGE_INSTALLER="Miniforge3-Linux-$(uname -m).sh"
curl -fL -o "$MINIFORGE_INSTALLER" \
"https://github.com/conda-forge/miniforge/releases/latest/download/$MINIFORGE_INSTALLER"
bash "$MINIFORGE_INSTALLER" -b -p "$HOME/miniforge3"
source "$HOME/miniforge3/etc/profile.d/conda.sh"
source "$HOME/miniforge3/etc/profile.d/mamba.sh"
conda config --set auto_activate_base false
conda init bash
conda --version
mamba --version
Open a new interactive shell after conda init, or keep using the current shell
where conda.sh and mamba.sh were sourced. For Zsh, replace conda init bash
with conda init zsh.
The Miniforge release page publishes SHA-256 files beside versioned installers. Verify the downloaded installer there when preparing an unattended or shared-server installation.
Alternative: Install Micromamba#
Micromamba is useful when a full base Conda installation is undesirable. It is
a self-contained executable with no Python or populated base environment.
It provides the micromamba command only, not conda or mamba. These commands
install the Linux x86-64 binary without sudo:
mkdir -p "$HOME/.local/bin"
curl -fLs https://micro.mamba.pm/api/micromamba/linux-64/latest \
| tar -xvj -C "$HOME/.local/bin" --strip-components=1 bin/micromamba
export MAMBA_ROOT_PREFIX="$HOME/micromamba"
eval "$("$HOME/.local/bin/micromamba" shell hook -s bash)"
micromamba shell init -s bash -r "$MAMBA_ROOT_PREFIX"
micromamba --version
Open a new interactive shell after shell init, or keep using the current shell
where the shell hook was evaluated. For Linux ARM64, use linux-aarch64 instead
of linux-64 in the download URL. That installs the environment manager only.
The supplied mppt_env.yaml and compiler-wrapper commands target Linux x86-64
and must not be used unchanged on ARM64 or another architecture; see the
installation guide.
Micromamba upstream describes the binary as fully statically linked, but its
manual installation guide still requires a glibc-based Linux distribution.
Alpine Linux does not work natively. Always run micromamba --version on the
target host before creating the MPPT environment.
Optional: Install Miniconda#
Use the latest Miniconda Linux installer only on hosts with glibc >= 2.28:
cd "$HOME"
curl -fL -o Miniconda3.sh \
https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3.sh -b -p "$HOME/miniconda3"
source "$HOME/miniconda3/etc/profile.d/conda.sh"
conda config --set auto_activate_base false
conda init bash
conda --version
The latest Miniconda Linux installers do not run on glibc 2.17. Anaconda
provides an installer archive for older
operating systems, but Miniforge is the supported MPPT recommendation for
glibc 2.17-2.27. Do not upgrade or replace the system glibc to make an
installer start. Full Anaconda Distribution is also compatible on supported
hosts, but its bundled package set is not required by MPPT.
Create The MPPT Environment#
Clone MPPT once:
git clone https://gitlab.com/seregmikhail/mppt-public.git mppt
cd mppt
Then choose exactly one environment-manager block. mppt_env.yaml pins direct
dependency versions, but it is not an immutable lockfile with package build
strings and hashes.
With conda from Miniforge, Miniconda, or Anaconda Distribution (recommended):
conda env create -f mppt_env.yaml
conda activate mppt
Miniforge users may use mamba for environment creation and the initialized
conda shell for activation:
source "$HOME/miniforge3/etc/profile.d/mamba.sh"
mamba create -y -f mppt_env.yaml
conda activate mppt
With Micromamba, use micromamba for both operations:
micromamba create -y -f mppt_env.yaml
micromamba activate mppt
All activation paths set CONDA_PREFIX, which the MPPT CMake commands use
for compiler, HDF5, BLAS/LAPACK, OpenMP, and runtime-library discovery.
python --version
cmake --version
git --version
make --version
printf '%s\n' "$CONDA_PREFIX"
Continue with the MPPT installation guide.
For native PySCF DMRG-CASSCF, the optional mppt_block2_env.yaml creates
mppt-block2 with block2 and its PySCF adapter. Follow the
block2 setup and solver check
to configure the executable before importing pyscf.dmrgscf.