Difference between revisions of "Apptainer"
Line 59: | Line 59: | ||
or even create a shell in the software environment provided by the container with | or even create a shell in the software environment provided by the container with | ||
$ apptainer shell lolcow_latest.sif | $ apptainer shell lolcow_latest.sif | ||
+ | |||
+ | Another example: | ||
+ | |||
+ | $ apptainer build lolcow.sif docker://godlovedc/lolcow | ||
+ | |||
+ | $ apptainer run lolcow.sif | ||
+ | |||
See User and Admin documentation for more information on how to create and use HPC containers. | See User and Admin documentation for more information on how to create and use HPC containers. |
Revision as of 17:22, 25 October 2023
Description
Apptainer/Singularity is the most widely used container system for HPC. It is designed to execute applications at bare-metal performance while being secure, portable, and 100% reproducible.
Apptainer is 100% Docker and OCI (Open Containers Initiative) compatible (but easier to use).
Apptainer intuitively allows non-privileged users to run any containerized application.
The single-file SIF container format allows you to reproducibly build, share, and archive your workload from workstations, to HPC, to the edge. Secure
Apptainer runs "rootless" and prohibits privilege escalation within the container; users are the same inside and outside the container.
Apptainer's security architecture allows you to securely leverage GPUs, FPGAs, high-speed networks, and filesystems.
Environment Modules
Run module spider apptainer
to find out what environment modules are available for this application.
System Variables
- HPC_APPTAINER_DIR - installation directory
- TMPDIR - temporary files directory
- If users load container runtime on a login node before submitting a job or set TMPDIR before the submission the resulting TMPDIR will be carried into the job overriding HPG's normal mechanisms as usual and the job TMPDIR will be set to /scratch/local/$JOBID. If the container runtime is loaded before the job is submitted and TMPDIR is not set it will be set to $(pwd)/tmp by the module load. Users should not use /tmp when they run analyses on HiPerGator as /tmp is configured to be small and can be easily filled up causing a node to fail. See more at Temporary Directories.
Additional Information
HiPerGator usage examples:
- Run a container from Docker Hub
$ apptainer run docker://godlovedc/lolcow
The above will result in a lolcow_latest.sif container image creation. You can run the default program from that container with
$ apptainer run lolcow_latest.sif
or execute a particular binary of your choosing with
$ apptainer exec lolcow_latest.sif ls
or even create a shell in the software environment provided by the container with
$ apptainer shell lolcow_latest.sif
Another example:
$ apptainer build lolcow.sif docker://godlovedc/lolcow
$ apptainer run lolcow.sif
See User and Admin documentation for more information on how to create and use HPC containers.