Apptainer: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 37: Line 37:
** Supports rootless (i.e., normal) container use, etc. similar to Apptainer.
** Supports rootless (i.e., normal) container use, etc. similar to Apptainer.
** Is available as a package in rpm-supporting (and some other) Linux distributions.
** Is available as a package in rpm-supporting (and some other) Linux distributions.
** While Podman is a Linux container technology there are [https://github.com/containers/podman/blob/main/docs/tutorials/mac_win_client.md instructions for installing Podman on Windows/Mac machines].
** While Podman is a Linux container technology, there are [https://github.com/containers/podman/blob/main/docs/tutorials/mac_win_client.md instructions for installing Podman on Windows/Mac machines].
** Podman version 4 supports Apptainer .SIF files.
** Podman version 4 supports Apptainer .SIF files.
* [https://www.docker.com/ Docker]
* [https://www.docker.com/ Docker]
** Using Docker on an multi-user cluster creates security risks, therefore we do not make Docker available on our HPC clusters.
** Using Docker on a multiuser cluster creates security risks, therefore we do not make Docker available on our HPC clusters.
** You can install and use Docker on your own computer and use it to create an Apptainer image, which can then be uploaded to an HPC cluster as outlined in <b>[[#Creating_an_Apptainer_Container_From_a_Dockerfile|this section]]</b> later on this page.
** You can install and use Docker on your own computer and use it to create an Apptainer image, which can then be uploaded to an HPC cluster as outlined in <b>[[#Creating_an_Apptainer_Container_From_a_Dockerfile|this section]]</b> later on this page.


Line 92: Line 92:


<!--T:21-->
<!--T:21-->
Another important option is the <code>-W</code> or <code>--workdir</code> option. On Alliance clusters and on most Linux systems, <code>/tmp</code> and similar filesystems use RAM, not disk space. Since jobs typically run on our clusters with limited RAM amounts, this can result in jobs getting killed because they consume too much RAM relative to what was requested for the job. A suitable work-around for this is to tell Apptainer to use a real disk location for its working directory ("workdir"). This is done by passing the <code>-W</code> option followed by a path to a disk location where Apptainer can read/write temporary files, etc. For example, suppose one wanted to run a command called <code>myprogram</code> in a using an Apptainer container image called <code>myimage.sif</code> with its "workdir" set to <code>/path/to/a/workdir</code> in the filesystem:
Another important option is the <code>-W</code> or <code>--workdir</code> option. On Alliance clusters and on most Linux systems, <code>/tmp</code> and similar filesystems use RAM, not disk space. Since jobs typically run on our clusters with limited RAM amounts, this can result in jobs getting killed because they consume too much RAM relative to what was requested for the job. A suitable workaround for this is to tell Apptainer to use a real disk location for its working directory ("workdir"). This is done by passing the <code>-W</code> option followed by a path to a disk location where Apptainer can read/write temporary files, etc. For example, suppose one wanted to run a command called <code>myprogram</code> in a using an Apptainer container image called <code>myimage.sif</code> with its "workdir" set to <code>/path/to/a/workdir</code> in the filesystem:


<!--T:22-->
<!--T:22-->
rsnt_translations
56,420

edits

Navigation menu