Nix package manager tackles reproducibility in HPC-AI software stacks
Hybrid stack unifies C/C++, Python, and GPU runtimes without root access.
A new paper from Wenke Du (DATAMOVE), Jean-Marc Gratien, Raphael Gayno (both IFPEN), and Bruno Raffin (DATAMOVE) presents Nix as a solution for reproducibility in high-performance computing (HPC) and AI software stacks. The authors target production supercomputers with constraints like no root access, limited internet, and complex stacks mixing C/C++, Fortran, Python, MPI, and GPU runtimes. They report that traditional environment modules and Conda require manual dependency location, leak system libraries, and fail to compose across projects. Containers help with deployment but don't guarantee reproducibility. Nix's declarative package management, with its consistent package layout, full environment isolation, and flake-based composition, resolves these issues. The authors demonstrate a workflow that spans local development on a workstation without root privileges to remote deployment as an Apptainer image on a production cluster, unifying C/C++ and Python management under a single specification.
The paper also discusses trade-offs against Spack and Guix, noting that while Spack is popular for HPC, it lacks the same level of environment isolation and flake-based reproducibility. The authors use CMake presets to manage development versus production splits and highlight current gaps in ML package coverage within Nixpkgs. Despite these gaps, the approach offers a promising path for teams needing reproducible, composable, and portable HPC-AI stacks. The work was presented at the 1st Workshop on Sustainable Practices for Reproducibility in HPC in Hamburg, June 2026.
- Nix provides full environment isolation and a consistent package layout, solving dependency leakage found in modules and Conda.
- The hybrid stack covers C/C++, Fortran, Python, MPI, and GPU runtimes, unified under a single declarative Nix specification.
- Workflow spans local workstation (no root) to production cluster via Apptainer images, using flake-based composition and CMake presets.
Why It Matters
A reproducible, portable software stack is critical for HPC-AI research; Nix offers a practical, declarative fix.