
Pixi is a package manager built on the conda ecosystem. It installs into user space, so it can be used on a personal laptop or on a shared HPC cluster where administrator rights are unavailable. This note is a short primer: installation, cluster configuration, and the commands we use most often to pin a reproducible environment.
For a worked example of the same approach applied to a full analysis, see Setting up single-cell RNA-seq analysis with Pixi, written as a collaboration between RIVERXDATA and NGS101.
This is convenient on shared systems where sudo is not available.
curl -fsSL https://pixi.sh/install.sh | bashThe script installs Pixi into ~/.pixi/bin and updates the shell configuration. Restart the terminal, or reload the shell:
source ~/.bashrc # or ~/.zshrcpixi --versionpixi --helpHome directories on clusters often have a small quota. Pointing the cache at scratch space avoids filling it:
export PIXI_CACHE_DIR=/scratch/$USER/pixi-cacheAdd the line to ~/.bashrc or ~/.bash_profile to make it persistent.
When the cluster reaches the internet through a proxy, configure it in $HOME/.pixi/config.toml:
[proxy-config]http = "http://proxy.example.com:8080/"https = "http://proxy.example.com:8080/"non-proxy-hosts = [".cn", "localhost", "[::1]"]See the Pixi configuration reference for the remaining options.
On a fast network, a small increase in concurrency can shorten environment creation:
[concurrency]downloads = 5Pixi records a project's tooling in pixi.toml and locks exact versions in pixi.lock.
pixi initpixi workspace channel add conda-forge biocondapixi workspace platform add osx-arm64 linux-64An example pixi.toml:
[workspace]channels = ["bioconda", "conda-forge"]name = "<your project>"platforms = ["linux-64", "osx-arm64"]version = "0.1.0"
[tasks]
[dependencies]pixi add fastqc multiqcThis updates the dependencies in pixi.toml:
[dependencies]fastqc = ">=0.12.1,<0.13"multiqc = ">=1.17,<2"Pixi also writes pixi.lock, which records the exact package versions and checksums so the same environment can be rebuilt later.
Tools can be run directly:
pixi run fastqc --helpOr from an activated environment:
pixi shellfastqc --helppixi.toml and pixi.lock keep environments reproducible across machines and over time.




