-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Formalizing our Spack environment helps us achieve reproducibility goals by:
From Spack documentation:
-
Environments separate the steps of (a) choosing what to install, (b) concretizing, and (c) installing. This allows Environments to remain stable and repeatable, even if Spack packages are upgraded: specs are only re-concretized when the user explicitly asks for it. (see Spack lock files)
-
An Environment that is built as a whole can be loaded as a whole into the user environment. An Environment can be built to maintain a filesystem view of its packages, and the environment can load that view into the user environment at activation time. Spack can also generate a script to load all modules related to an environment. We will do something slightly different with Docker here. I would like to export a spack environment (eg-
spack env load), and dump this environment setup script into a "docker_base.sh" script in /etc/profile.d. This is extensible for all layers of our reproducible infrastructure, as everything with a.shextension is loaded as a consequence of default settings in /etc/bashrc in Centos7.
The overall design goal I have in mind is to have a Docker image tightly coupled with a Spack environment for all layers of our reproducible infrastructure. The software stack for such an environment might look like this:
Reproducible OS base: The Docker environment gives us a nice OS base, and helps us cover some of the software dependencies that don't need to be compiled using that OS' package manager. For example- Openssl, LaTeX, glibc, etc.
Compiled software stack for HW optimization: Spack allows us to compile software when required, if a such package exists in Spack. This is the simplest way to compile software with HW optimizations. Creating a Spack package is preferable, but may not make sense for all experiment pipelines. Software design principles are secondary to research artifact deliverables.
All other software: When a Spack package is unavailable, explicit scripts to pull source code and build based on simple bash scripts is a last resort.