Pixi- New conda era
Pixi is a fast, modern package management tool built on the conda ecosystem. Whether you're on a personal laptop or an HPC cluster, Pixi makes environment setup simple and reproducible. Here’s a primer on using Pixi. For a full workflow, see: Setting up single-cell RNA-seq analysis with Pixi as collaboration between RIVERXDATA and NGS101
Installing Pixi
System Requirements
- OS: Any modern Unix (Ubuntu, Debian, CentOS, Fedora, Arch, MacOS, etc.)
- Disk Space: 50–100 MB for Pixi, plus space for packages/cache
- Privileges: No sudo/root needed—Pixi installs in user space
Ideal for shared environments without admin access.
One-Line Installation
Run in your terminal:
curl -fsSL https://pixi.sh/install.sh | bash
This downloads Pixi, installs it to ~/.pixi/bin, and updates your shell config. After install, restart your terminal or run:
source ~/.bashrc # or ~/.zshrc
Verify Installation
Check Pixi is working:
pixi --version
pixi --help
HPC Configuration
Custom Cache Location
To avoid home directory quotas, set a custom cache:
export PIXI_CACHE_DIR=/scratch/$USER/pixi-cache
Add to your ~/.bashrc or ~/.bash_profile for persistence.
Proxy Settings
If your cluster uses a proxy, edit $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 Pixi configuration docs for details.
Parallel Downloads
Speed up downloads on fast networks:
[concurrency]
downloads = 5
Project Activation
Pixi helps you create reproducible environments with lock files.
Initialize a Project
pixi init
pixi workspace channel add conda-forge bioconda
pixi workspace platform add osx-arm64 linux-64
Example pixi.toml:
[workspace]
channels = ["bioconda", "conda-forge"]
name = "<your project>"
platforms = ["linux-64", "osx-arm64"]
version = "0.1.0"
[tasks]
[dependencies]
Add Tools
pixi add fastqc multiqc
Updates dependencies in pixi.toml:
[dependencies]
fastqc = ">=0.12.1,<0.13"
multiqc = ">=1.17,<2"
A pixi.lock file is created for reproducibility, specifying exact package versions and checksums.
Run Tools
Run tools directly:
pixi run fastqc --help
Or activate the environment shell:
pixi shell
fastqc --help
Recap
- Pixi is a user-space, conda-based package manager ideal for laptops and HPC clusters.
- Easy one-line installation, no admin rights needed.
- Supports custom cache and proxy settings for HPC environments.
- Enables reproducible project environments with lock files.
- Simple commands to add tools and run them in isolated environments.
Enjoy your Pixi-powered workflow!