Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
habrok:examples:apptainer [2023/04/14 11:52] – ↷ Page name changed from habrok:examples:singularity to habrok:examples:apptainer adminhabrok:examples:apptainer [2026/06/29 12:45] (current) – [Using a GPU in your container] pedro
Line 76: Line 76:
 </code> </code>
  
 +==== Using a GPU in your container ====
 +
 +In order to make a GPU available in the container, you will have to use the ''%%--%%nv'' flag for the Apptainer subcommand, e.g.:
 +<code bash>
 +apptainer exec --nv /scratch/$USER/fsl6_latest.sif fsl_anat <arguments>
 +</code>
 +
 +Note that this only makes sense if you are running the container in a GPU enabled node. Those would be the interactive GPU nodes ''gpu1.hb.hpc.rug.nl'' and ''gpu2.hb.hpc.rug.nl'' or as part of [[..:advanced_job_management:running_jobs_on_gpus|GPU jobs]].