Apptainer: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 126: Line 126:


==Building an Apptainer Container/Image==
==Building an Apptainer Container/Image==
===Overview===


Apptainer "images" can be created in the following formats:
Apptainer "images" can be created in the following formats:
Line 147: Line 148:
Using an <code>SIF</code> image is recommended as disk performance (from the container image) will be faster than storing each file, etc. separately on Alliance cluster filesystems (which are set up to handle large files and parallel I/O). Using an <code>SIF</code> file instead of a sandbox image will also only use a quota file count amount of 1 instead of thousands (e.g., images will typically contain thousands of files and directories).
Using an <code>SIF</code> image is recommended as disk performance (from the container image) will be faster than storing each file, etc. separately on Alliance cluster filesystems (which are set up to handle large files and parallel I/O). Using an <code>SIF</code> file instead of a sandbox image will also only use a quota file count amount of 1 instead of thousands (e.g., images will typically contain thousands of files and directories).


===Building a Sandbox Directory===
===Building a Sandbox Image===


In order to build a "sandbox" directory instead of an <code>SIF</code> file instead of providing an <code>SIF</code> file name, instead provide <code>--sandbox DIR_NAME</code> or <code>-s DIR_NAME</code> where <code>DIR_NAME</code> is the name of the to-be-created-directory where you want your "sandbox" image. For example, if the <code>apptainer build</code> command to create an <code>SIF</code> file was:
In order to build a "sandbox" directory instead of an <code>SIF</code> file instead of providing an <code>SIF</code> file name, instead provide <code>--sandbox DIR_NAME</code> or <code>-s DIR_NAME</code> where <code>DIR_NAME</code> is the name of the to-be-created-directory where you want your "sandbox" image. For example, if the <code>apptainer build</code> command to create an <code>SIF</code> file was:
Line 161: Line 162:
Within an account, using a "sandbox" directory will consume significant amounts of both disk space and file count quotas, thus, if read-write access to the underlying image is not normally required, you are advised to use an <code>SIF</code> instead. Additionally, using an <code>SIF</code> file will have higher disk access speeds to content contained within the <code>SIF</code> file.
Within an account, using a "sandbox" directory will consume significant amounts of both disk space and file count quotas, thus, if read-write access to the underlying image is not normally required, you are advised to use an <code>SIF</code> instead. Additionally, using an <code>SIF</code> file will have higher disk access speeds to content contained within the <code>SIF</code> file.


===Building an SIF File===
===Building an SIF Image===


'''NOTE:''' This section only discusses some basics of creating a simple compressed, read-only <code>SIF</code> file container image. See the [https://apptainer.org/docs Apptainer documentation] for more advanced aspects of building images.
'''NOTE:''' This section only discusses some basics of creating a simple compressed, read-only <code>SIF</code> file container image. See the [https://apptainer.org/docs Apptainer documentation] for more advanced aspects of building images.
cc_staff
156

edits

Navigation menu