rsnt_translations
56,420
edits
No edit summary |
No edit summary |
||
Line 92: | Line 92: | ||
<!--T:21--> | <!--T:21--> | ||
Another important option is the <code>-W</code> or <code>--workdir</code> option. On our 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 (<code>workdir</code>). 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 | Another important option is the <code>-W</code> or <code>--workdir</code> option. On our 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 (<code>workdir</code>). 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 For example, to run a command called <code>myprogram</code> in an Apptainer container image called <code>myimage.sif</code> with its working directory set to <code>/path/to/a/workdir</code> in the filesystem, you would use | ||
<!--T:22--> | <!--T:22--> | ||
Line 113: | Line 113: | ||
** These options will locate and bind GPU-related libraries on the host (e.g., so such becomes bind-mounted inside the container) as well as setting the <code>LD_LIBRARY_PATH</code> environment variable to enable the aforementioned libraries will work inside the container. | ** These options will locate and bind GPU-related libraries on the host (e.g., so such becomes bind-mounted inside the container) as well as setting the <code>LD_LIBRARY_PATH</code> environment variable to enable the aforementioned libraries will work inside the container. | ||
* Ensure the application using the GPU inside the container was properly compiled to use the GPU and its libraries. | * Ensure the application using the GPU inside the container was properly compiled to use the GPU and its libraries. | ||
* When needing to use OpenCL inside the container, besides using the aforementioned options use the following bind mount: <code>-B /etc/OpenCL</code>. | * When needing to use OpenCL inside the container, besides using the aforementioned options, use the following bind mount: <code>-B /etc/OpenCL</code>. | ||
<!--T:26--> | <!--T:26--> | ||
An example of [[#Using_NVIDIA_GPUs_Within_an_Apptainer_Container|using NVIDIA GPUs within an | An example of [[#Using_NVIDIA_GPUs_Within_an_Apptainer_Container|using NVIDIA GPUs within an Apptainer container]] appears later on this page. | ||
==Using MPI programs== <!--T:27--> | ==Using MPI programs== <!--T:27--> |