Apptainer (formerly Singularity) definition file distribution for better user experience
@THO, @mark
Functionality to add/problem to solve
add Apptainer(*1)(*2) definition file to OpenFOAM repository and distribute those definition file on OpenFOAM "Download" page for better user experience.
- (*1) Apptainer is formerly Singularity that is container solution specifically designed for HPC application.
- (*2)Now moved to Linux Foundation Project and renamed to Apptainer.
problem to solve
- Docker is designed for "services" and isolate container from the host.
- Apptainer is designed for "applications" and integrate container to host environment.
- What we tackle here is that, if we use Docker for OpenFOAM, we need to tweak uid/gid inside Docker container to properly read/write user owned directories and files. On the other hand, if we use Apptainer for OpenFOAM, that automatically mount user's
$HOME
directory and it run as its user so that we don't need to tweak uid/gid to containerizing OpenFOAM.
Target audience
(Who will benefit from the changes?)
- OpenFOAM Users
- HPC admins/ops
- OpenFOAM developers
- those who packaging/distributing OpenFOAM
(What type of cases?)
- OpenFOAM Users ... Apptainer is easy to install (from EPEL, or deb package), and is rootless/daemon-less container solution. Users doesn't need to run daemon like Docker, and since Apptainer 1.1.0 users can build/run Apptainer container without privilege. Apptainer container is single file so that once users build container they can copy that file from laptop to workstation, from workstation to HPC clusters, from researcher to researchers, etc.
- HPC admins/ops ... No daemon process for Apptainer, well integrate to HPC environment with less security vectors. Easy to deliver multiple OpenFOAM versions with good isolation.
- OpenFOAM developers ... OpenFOAM users are mostly developers as well, once you create container includes multiple dependent libraries for your project, you can mobile your development environment to anywhere and easy to share to the others.
- those who packaging/distributing OpenFOAM ... Using Apptainer instead of Docker eliminates uid/gid hustle. Apptainer definition file is text file so that file size is small and easy to distribute/download.
Proposal
(How are we going to solve the problem?)
- Porting existing Dockerfile to Apptainer definition file
- Publish those files to repository
- Upload definition files to Download page
- Write blog article for its usage (user guide)
What does success look like, and how can we measure that?
(What are the success factors and acceptance criteria? e.g. test cases, error margins)
- Create Apptainer container using above definition files and test some sample cases
- Replicate procedures on testers environment based on blog post (user guide) and test above sample cases
Links / references
ex.) Apptainer adaption to OpenRadioss https://ciq.co/blog/original-running-camry-impact-model-in-ls-dyna-format-using-openradioss-and-apptainer/
Funding
(Does the functionality already exist/is sponsorship available?) I would like to work on this issue.
Edited by Yoshiaki Senda