<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.anunna.wur.nl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Honfi001</id>
	<title>HPCwiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.anunna.wur.nl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Honfi001"/>
	<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php/Special:Contributions/Honfi001"/>
	<updated>2026-05-14T06:36:33Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=SACCT&amp;diff=2717</id>
		<title>SACCT</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=SACCT&amp;diff=2717"/>
		<updated>2026-04-14T05:33:28Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The command [http://slurm.schedmd.com/sacct.html sacct] is meant to show your usage of  Anunna.&lt;br /&gt;
&lt;br /&gt;
For instance at the login screen the command: sacct -a gives the following result:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
user001@login200:~$ sacct -a &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;[[File:sacct capture.jpg]]&lt;br /&gt;
&lt;br /&gt;
It is a standard view to see all the users jobs of that day.&lt;br /&gt;
Better is to modify this command with special parameters to see what you are using from Anunna.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
user001@login200:~$ sacct -P -X --delimiter=&#039;,&#039; -S 2026-01-01 -E 2026-02-01  \ &lt;br /&gt;
--format=comment%15,User,Partition%20,JobID,JobName,ncpus,nnodes,NodeList,Start,alloccpus,cputime%12,cputimeraw,state  &amp;gt; usage_report_$(date -I).csv&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The csv-file can be uploaded in Excel. This gives you the next overview. &lt;br /&gt;
Cputimeraw is the time of cpu-usage in seconds. The parameters &amp;quot;-S 2026-01-01 -E 2026-02-01&amp;quot; give you the start date and the end date of period you want to present.&lt;br /&gt;
&lt;br /&gt;
[[File:sacct uitgebreid.jpg]]&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=SACCT&amp;diff=2716</id>
		<title>SACCT</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=SACCT&amp;diff=2716"/>
		<updated>2026-04-14T05:32:15Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The command [http://slurm.schedmd.com/sacct.html sacct] is meant to show your usage of  Anunna.&lt;br /&gt;
&lt;br /&gt;
For instance at the login screen the command: sacct -a gives the following result:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[test001@nfs01 ~]$ sacct -a&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:sacct capture.jpg]]&lt;br /&gt;
&lt;br /&gt;
It is a standard view to see all the users jobs of that day.&lt;br /&gt;
Better is to modify this command with special parameters to see what you are using from Anunna.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
user001@login200:~$ sacct -P -X --delimiter=&#039;,&#039; -S 2026-01-01 -E 2026-02-01  \ &lt;br /&gt;
--format=comment%15,User,Partition%20,JobID,JobName,ncpus,nnodes,NodeList,Start,alloccpus,cputime%12,cputimeraw,state  &amp;gt; usage_report_$(date -I).csv&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The csv-file can be uploaded in Excel. This gives you the next overview. &lt;br /&gt;
Cputimeraw is the time of cpu-usage in seconds. The parameters &amp;quot;-S 2026-01-01 -E 2026-02-01&amp;quot; give you the start date and the end date of period you want to present.&lt;br /&gt;
&lt;br /&gt;
[[File:sacct uitgebreid.jpg]]&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials&amp;diff=2706</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials&amp;diff=2706"/>
		<updated>2026-03-25T10:37:06Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: /* Apptainer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Tutorials ==&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
[[Create Your Own Modules]]&lt;br /&gt;
&lt;br /&gt;
=== Apptainer ===&lt;br /&gt;
&lt;br /&gt;
* [[Tutorials/Apptainer-Introduction|Introduction]]&lt;br /&gt;
* [[Tutorials/Apptainer-PullingImages|Pulling Images]]&lt;br /&gt;
* [[Tutorials/Apptainer-FakerootAndOverlays|Fakeroot and overlays]]&lt;br /&gt;
* [[Tutorials/Apptainer-FakerootAndSandbox|Fakeroot  and sandbox]]&lt;br /&gt;
* [[Tutorials/Apptainer-DefinitionFiles|Definition Files]]&lt;br /&gt;
* [[Tutorials/Apptainer-GPUs|GPUs]]&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials&amp;diff=2705</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials&amp;diff=2705"/>
		<updated>2026-03-25T10:36:07Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Tutorials ==&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
[[Create Your Own Modules]]&lt;br /&gt;
&lt;br /&gt;
=== Apptainer ===&lt;br /&gt;
&lt;br /&gt;
* Introduction&lt;br /&gt;
* [[Tutorials/Apptainer-PullingImages|Pulling Images]]&lt;br /&gt;
* [[Tutorials/Apptainer-FakerootAndOverlays|Fakeroot and overlays]]&lt;br /&gt;
* [[Tutorials/Apptainer-FakerootAndSandbox|Fakeroot  and sandbox]]&lt;br /&gt;
* [[Tutorials/Apptainer-DefinitionFiles|Definition Files]]&lt;br /&gt;
* [[Tutorials/Apptainer-GPUs|GPUs]]&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-GPUs&amp;diff=2704</id>
		<title>Tutorials/Apptainer-GPUs</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-GPUs&amp;diff=2704"/>
		<updated>2026-03-25T10:33:38Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Running Apptainer with GPUs =&lt;br /&gt;
&lt;br /&gt;
Apptainer can pass through GPU hardware from the host into a container, allowing you to run GPU-accelerated workloads (such as deep learning inference or training) inside a fully contained environment. This page covers how to use both NVIDIA and AMD GPUs on the Anunna cluster.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; Before you begin, make sure the following are in place:&lt;br /&gt;
&lt;br /&gt;
* Your &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; image files should be stored on &#039;&#039;&#039;Lustre&#039;&#039;&#039; (e.g. in your scratch space), not in your home directory.&lt;br /&gt;
* Set your Apptainer cache to Lustre, since these images can get quite large:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export APPTAINER_CACHEDIR=$myScratch/Apptainer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How GPU Passthrough Works ==&lt;br /&gt;
&lt;br /&gt;
Apptainer does not include GPU drivers inside the container. Instead, it &#039;&#039;&#039;binds&#039;&#039;&#039; the GPU drivers and libraries from the host system into the container at runtime. This means:&lt;br /&gt;
&lt;br /&gt;
* The container must include software built for the correct GPU framework (CUDA for NVIDIA, ROCm for AMD).&lt;br /&gt;
* The host must have the matching GPU drivers installed (which Anunna already has on the GPU nodes).&lt;br /&gt;
* You tell Apptainer to enable GPU access using a flag: &amp;lt;code&amp;gt;--nv&amp;lt;/code&amp;gt; for NVIDIA or &amp;lt;code&amp;gt;--rocm&amp;lt;/code&amp;gt; for AMD.&lt;br /&gt;
&lt;br /&gt;
== NVIDIA GPUs (&amp;lt;code&amp;gt;gpu&amp;lt;/code&amp;gt; partition) ==&lt;br /&gt;
&lt;br /&gt;
To use NVIDIA GPUs, you need to:&lt;br /&gt;
&lt;br /&gt;
# Request a node on the &amp;lt;code&amp;gt;gpu&amp;lt;/code&amp;gt; partition.&lt;br /&gt;
# Use the &amp;lt;code&amp;gt;--nv&amp;lt;/code&amp;gt; flag when running your container.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--nv&amp;lt;/code&amp;gt; flag tells Apptainer to:&lt;br /&gt;
* Make the &amp;lt;code&amp;gt;/dev/nvidiaX&amp;lt;/code&amp;gt; device entries available inside the container.&lt;br /&gt;
* Locate and bind the CUDA libraries from the host into the container.&lt;br /&gt;
* Set &amp;lt;code&amp;gt;LD_LIBRARY_PATH&amp;lt;/code&amp;gt; so the container uses the host&#039;s GPU libraries.&lt;br /&gt;
&lt;br /&gt;
=== Example: Transcribing Audio with Whisper (NVIDIA) ===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/openai/whisper OpenAI Whisper] is a speech recognition model that benefits greatly from GPU acceleration. Let&#039;s build a container that runs Whisper on an NVIDIA GPU.&lt;br /&gt;
&lt;br /&gt;
==== The Definition File ====&lt;br /&gt;
&lt;br /&gt;
Create a file called &amp;lt;code&amp;gt;whisper_nvidia.def&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;Bootstrap: docker&lt;br /&gt;
From: pytorch/pytorch:2.6.0-cuda12.4-cudnn9-devel&lt;br /&gt;
&lt;br /&gt;
%post&lt;br /&gt;
    apt-get update&lt;br /&gt;
    apt-get install -y ffmpeg git&lt;br /&gt;
    pip install openai-whisper&lt;br /&gt;
    apt-get clean&lt;br /&gt;
&lt;br /&gt;
%environment&lt;br /&gt;
    export LC_ALL=C&lt;br /&gt;
&lt;br /&gt;
%runscript&lt;br /&gt;
    exec whisper --device cuda&amp;quot;$@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
%help&lt;br /&gt;
    Whisper speech recognition container (NVIDIA GPU).&lt;br /&gt;
    Usage: apptainer run --nv whisper_nvidia.sif &amp;lt;audio_file&amp;gt; [options]&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A quick walkthrough of what is happening here:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Section !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Bootstrap / From&amp;lt;/code&amp;gt; || Uses the official PyTorch Docker image, which already includes Python, PyTorch, CUDA, and cuDNN.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;%post&amp;lt;/code&amp;gt; || Installs &amp;lt;code&amp;gt;ffmpeg&amp;lt;/code&amp;gt; (required by Whisper for audio decoding), &amp;lt;code&amp;gt;git&amp;lt;/code&amp;gt;, and the Whisper package itself.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;%environment&amp;lt;/code&amp;gt; || Sets the locale to avoid encoding warnings.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;%runscript&amp;lt;/code&amp;gt; || Makes &amp;lt;code&amp;gt;whisper&amp;lt;/code&amp;gt; the default command, passing through any arguments.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;%help&amp;lt;/code&amp;gt; || Provides usage information (accessible via &amp;lt;code&amp;gt;apptainer run-help&amp;lt;/code&amp;gt;).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Building the Image ====&lt;br /&gt;
&lt;br /&gt;
Request a compute node and build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module reset&lt;br /&gt;
module load utilities Apptainer&lt;br /&gt;
apptainer build whisper_nvidia.sif whisper_nvidia.def&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Running Whisper ====&lt;br /&gt;
&lt;br /&gt;
Once built, run Whisper on the sample audio file. First, request a GPU node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun --partition=gpu --gres=gpu:1 --pty bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then load Apptainer and run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module reset&lt;br /&gt;
module load utilities Apptainer&lt;br /&gt;
apptainer run --nv whisper_nvidia.sif /lustre/shared/hpcCourses/Whisper/audio.mp3 --model base&lt;br /&gt;
apptainer run --nv whisper_nvidia.sif /lustre/shared/hpcCourses/Whisper/audio.mp3 --model large&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--nv&amp;lt;/code&amp;gt; flag is what makes the GPU visible to the container. Without it, PyTorch would not detect any CUDA devices and Whisper would fall back to CPU (much slower).&lt;br /&gt;
&lt;br /&gt;
You can verify GPU access from inside the container with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer exec --nv whisper_nvidia.sif python -c &amp;quot;import torch; print(torch.cuda.is_available())&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should print &amp;lt;code&amp;gt;True&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== AMD GPUs (&amp;lt;code&amp;gt;gpu_amd&amp;lt;/code&amp;gt; partition) ==&lt;br /&gt;
&lt;br /&gt;
To use AMD GPUs, you need to:&lt;br /&gt;
&lt;br /&gt;
# Request a node on the &amp;lt;code&amp;gt;gpu_amd&amp;lt;/code&amp;gt; partition.&lt;br /&gt;
# Use the &amp;lt;code&amp;gt;--rocm&amp;lt;/code&amp;gt; flag when running your container.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--rocm&amp;lt;/code&amp;gt; flag tells Apptainer to:&lt;br /&gt;
* Make the &amp;lt;code&amp;gt;/dev/dri/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/dev/kfd&amp;lt;/code&amp;gt; device entries available inside the container.&lt;br /&gt;
* Locate and bind the ROCm libraries from the host into the container.&lt;br /&gt;
* Set &amp;lt;code&amp;gt;LD_LIBRARY_PATH&amp;lt;/code&amp;gt; so the container uses the host&#039;s ROCm libraries.&lt;br /&gt;
&lt;br /&gt;
=== Example: Transcribing Audio with Whisper (AMD) ===&lt;br /&gt;
&lt;br /&gt;
The same Whisper workflow, but using an AMD GPU with the ROCm stack.&lt;br /&gt;
&lt;br /&gt;
==== The Definition File ====&lt;br /&gt;
&lt;br /&gt;
Create a file called &amp;lt;code&amp;gt;whisper_amd.def&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Bootstrap: docker&lt;br /&gt;
From: rocm/pytorch:rocm7.2_ubuntu24.04_py3.13_pytorch_release_2.10.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
%post&lt;br /&gt;
    apt-get update&lt;br /&gt;
    apt-get install -y ffmpeg git&lt;br /&gt;
    pip install openai-whisper&lt;br /&gt;
    apt-get clean&lt;br /&gt;
&lt;br /&gt;
%environment&lt;br /&gt;
    export LC_ALL=C&lt;br /&gt;
&lt;br /&gt;
%runscript&lt;br /&gt;
    exec whisper --device cuda &amp;quot;$@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
%help&lt;br /&gt;
    Whisper speech recognition container (AMD ROCm GPU).&lt;br /&gt;
    Usage: apptainer run --rocm whisper_amd.sif &amp;lt;audio_file&amp;gt; [options]  --model &amp;lt;model_size&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The structure is identical to the NVIDIA version. The only difference is the base image: instead of &amp;lt;code&amp;gt;pytorch/pytorch&amp;lt;/code&amp;gt; (which includes CUDA), we use &amp;lt;code&amp;gt;rocm/pytorch&amp;lt;/code&amp;gt; (which includes ROCm). PyTorch&#039;s API is the same regardless of the backend — &amp;lt;code&amp;gt;torch.cuda.is_available()&amp;lt;/code&amp;gt; returns &amp;lt;code&amp;gt;True&amp;lt;/code&amp;gt; on ROCm as well, since ROCm maps onto the CUDA API.&lt;br /&gt;
&lt;br /&gt;
==== Building the Image ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module reset&lt;br /&gt;
module load utilities Apptainer&lt;br /&gt;
apptainer build whisper_amd.sif whisper_amd.def&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Running Whisper ====&lt;br /&gt;
&lt;br /&gt;
Request an AMD GPU node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun --partition=gpu_amd --gres=gpu:1 --pty bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then load Apptainer and run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;module reset&lt;br /&gt;
module load utilities Apptainer&lt;br /&gt;
apptainer run --rocm whisper_amd.sif /lustre/shared/hpcCourses/Whisper/audio.mp3 --model base  &lt;br /&gt;
apptainer run --rocm whisper_amd.sif /lustre/shared/hpcCourses/Whisper/audio.mp3 --model large  &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that even though we are on an AMD GPU, the &amp;lt;code&amp;gt;--device cuda&amp;lt;/code&amp;gt; flag is correct. PyTorch&#039;s ROCm backend uses the same &amp;lt;code&amp;gt;cuda&amp;lt;/code&amp;gt; device name for compatibility.&lt;br /&gt;
&lt;br /&gt;
Verify GPU access:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer exec --rocm whisper_amd.sif python -c &amp;quot;import torch; print(torch.cuda.is_available())&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! !! NVIDIA !! AMD&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Partition&#039;&#039;&#039; || &amp;lt;code&amp;gt;gpu&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;gpu_amd&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Apptainer flag&#039;&#039;&#039; || &amp;lt;code&amp;gt;--nv&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;--rocm&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Base image&#039;&#039;&#039; || &amp;lt;code&amp;gt;pytorch/pytorch&amp;lt;/code&amp;gt; (includes CUDA) || &amp;lt;code&amp;gt;rocm/pytorch&amp;lt;/code&amp;gt; (includes ROCm)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;PyTorch device&#039;&#039;&#039; || &amp;lt;code&amp;gt;--device cuda&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;--device cuda&amp;lt;/code&amp;gt; (same API)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Host devices bound&#039;&#039;&#039; || &amp;lt;code&amp;gt;/dev/nvidiaX&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;/dev/dri/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/dev/kfd&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The key takeaway: the only things that change between NVIDIA and AMD are the &#039;&#039;&#039;base container image&#039;&#039;&#039;, the &#039;&#039;&#039;Apptainer flag&#039;&#039;&#039;, and the &#039;&#039;&#039;Slurm partition&#039;&#039;&#039;. Your application code stays the same.&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-GPUs&amp;diff=2703</id>
		<title>Tutorials/Apptainer-GPUs</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-GPUs&amp;diff=2703"/>
		<updated>2026-03-25T09:42:06Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: Created page with &amp;quot;= Running Apptainer with GPUs =  Apptainer can pass through GPU hardware from the host into a container, allowing you to run GPU-accelerated workloads (such as deep learning inference or training) inside a fully contained environment. This page covers how to use both NVIDIA and AMD GPUs on the Anunna cluster.  &amp;#039;&amp;#039;&amp;#039;Important:&amp;#039;&amp;#039;&amp;#039; Before you begin, make sure the following are in place:  * Your &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; image files should be stored on &amp;#039;&amp;#039;&amp;#039;Lustre&amp;#039;&amp;#039;&amp;#039; (e.g. in your scrat...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Running Apptainer with GPUs =&lt;br /&gt;
&lt;br /&gt;
Apptainer can pass through GPU hardware from the host into a container, allowing you to run GPU-accelerated workloads (such as deep learning inference or training) inside a fully contained environment. This page covers how to use both NVIDIA and AMD GPUs on the Anunna cluster.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; Before you begin, make sure the following are in place:&lt;br /&gt;
&lt;br /&gt;
* Your &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; image files should be stored on &#039;&#039;&#039;Lustre&#039;&#039;&#039; (e.g. in your scratch space), not in your home directory.&lt;br /&gt;
* Set your Apptainer cache to Lustre:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export APPTAINER_CACHEDIR=$myScratch/Apptainer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How GPU Passthrough Works ==&lt;br /&gt;
&lt;br /&gt;
Apptainer does not include GPU drivers inside the container. Instead, it &#039;&#039;&#039;binds&#039;&#039;&#039; the GPU drivers and libraries from the host system into the container at runtime. This means:&lt;br /&gt;
&lt;br /&gt;
* The container must include software built for the correct GPU framework (CUDA for NVIDIA, ROCm for AMD).&lt;br /&gt;
* The host must have the matching GPU drivers installed (which Anunna already has on the GPU nodes).&lt;br /&gt;
* You tell Apptainer to enable GPU access using a flag: &amp;lt;code&amp;gt;--nv&amp;lt;/code&amp;gt; for NVIDIA or &amp;lt;code&amp;gt;--rocm&amp;lt;/code&amp;gt; for AMD.&lt;br /&gt;
&lt;br /&gt;
== NVIDIA GPUs (&amp;lt;code&amp;gt;gpu&amp;lt;/code&amp;gt; partition) ==&lt;br /&gt;
&lt;br /&gt;
To use NVIDIA GPUs, you need to:&lt;br /&gt;
&lt;br /&gt;
# Request a node on the &amp;lt;code&amp;gt;gpu&amp;lt;/code&amp;gt; partition.&lt;br /&gt;
# Use the &amp;lt;code&amp;gt;--nv&amp;lt;/code&amp;gt; flag when running your container.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--nv&amp;lt;/code&amp;gt; flag tells Apptainer to:&lt;br /&gt;
* Make the &amp;lt;code&amp;gt;/dev/nvidiaX&amp;lt;/code&amp;gt; device entries available inside the container.&lt;br /&gt;
* Locate and bind the CUDA libraries from the host into the container.&lt;br /&gt;
* Set &amp;lt;code&amp;gt;LD_LIBRARY_PATH&amp;lt;/code&amp;gt; so the container uses the host&#039;s GPU libraries.&lt;br /&gt;
&lt;br /&gt;
=== Example: Transcribing Audio with Whisper (NVIDIA) ===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/openai/whisper OpenAI Whisper] is a speech recognition model that benefits greatly from GPU acceleration. Let&#039;s build a container that runs Whisper on an NVIDIA GPU.&lt;br /&gt;
&lt;br /&gt;
==== The Definition File ====&lt;br /&gt;
&lt;br /&gt;
Create a file called &amp;lt;code&amp;gt;whisper_nvidia.def&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Bootstrap: docker&lt;br /&gt;
From: pytorch/pytorch:2.6.0-cuda12.4-cudnn9-devel&lt;br /&gt;
&lt;br /&gt;
%post&lt;br /&gt;
    apt-get update&lt;br /&gt;
    apt-get install -y ffmpeg git&lt;br /&gt;
    pip install openai-whisper&lt;br /&gt;
    apt-get clean&lt;br /&gt;
&lt;br /&gt;
%environment&lt;br /&gt;
    export LC_ALL=C&lt;br /&gt;
&lt;br /&gt;
%runscript&lt;br /&gt;
    exec whisper &amp;quot;$@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
%help&lt;br /&gt;
    Whisper speech recognition container (NVIDIA GPU).&lt;br /&gt;
    Usage: apptainer run --nv whisper_nvidia.sif &amp;lt;audio_file&amp;gt; [options]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A quick walkthrough of what is happening here:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Section !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Bootstrap / From&amp;lt;/code&amp;gt; || Uses the official PyTorch Docker image, which already includes Python, PyTorch, CUDA, and cuDNN.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;%post&amp;lt;/code&amp;gt; || Installs &amp;lt;code&amp;gt;ffmpeg&amp;lt;/code&amp;gt; (required by Whisper for audio decoding), &amp;lt;code&amp;gt;git&amp;lt;/code&amp;gt;, and the Whisper package itself.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;%environment&amp;lt;/code&amp;gt; || Sets the locale to avoid encoding warnings.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;%runscript&amp;lt;/code&amp;gt; || Makes &amp;lt;code&amp;gt;whisper&amp;lt;/code&amp;gt; the default command, passing through any arguments.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;%help&amp;lt;/code&amp;gt; || Provides usage information (accessible via &amp;lt;code&amp;gt;apptainer run-help&amp;lt;/code&amp;gt;).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Building the Image ====&lt;br /&gt;
&lt;br /&gt;
Request a compute node and build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module reset&lt;br /&gt;
module load utilities Apptainer&lt;br /&gt;
apptainer build whisper_nvidia.sif whisper_nvidia.def&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Running Whisper ====&lt;br /&gt;
&lt;br /&gt;
Once built, run Whisper on the sample audio file. First, request a GPU node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun --partition=gpu --gres=gpu:1 --pty bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then load Apptainer and run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module reset&lt;br /&gt;
module load utilities Apptainer&lt;br /&gt;
apptainer run --nv whisper_nvidia.sif /lustre/shared/hpcCourses/Whisper/audio.mp3 --model base --device cuda&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--nv&amp;lt;/code&amp;gt; flag is what makes the GPU visible to the container. Without it, PyTorch would not detect any CUDA devices and Whisper would fall back to CPU (much slower).&lt;br /&gt;
&lt;br /&gt;
You can verify GPU access from inside the container with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer exec --nv whisper_nvidia.sif python -c &amp;quot;import torch; print(torch.cuda.is_available())&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should print &amp;lt;code&amp;gt;True&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== AMD GPUs (&amp;lt;code&amp;gt;gpu_amd&amp;lt;/code&amp;gt; partition) ==&lt;br /&gt;
&lt;br /&gt;
To use AMD GPUs, you need to:&lt;br /&gt;
&lt;br /&gt;
# Request a node on the &amp;lt;code&amp;gt;gpu_amd&amp;lt;/code&amp;gt; partition.&lt;br /&gt;
# Use the &amp;lt;code&amp;gt;--rocm&amp;lt;/code&amp;gt; flag when running your container.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--rocm&amp;lt;/code&amp;gt; flag tells Apptainer to:&lt;br /&gt;
* Make the &amp;lt;code&amp;gt;/dev/dri/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/dev/kfd&amp;lt;/code&amp;gt; device entries available inside the container.&lt;br /&gt;
* Locate and bind the ROCm libraries from the host into the container.&lt;br /&gt;
* Set &amp;lt;code&amp;gt;LD_LIBRARY_PATH&amp;lt;/code&amp;gt; so the container uses the host&#039;s ROCm libraries.&lt;br /&gt;
&lt;br /&gt;
=== Example: Transcribing Audio with Whisper (AMD) ===&lt;br /&gt;
&lt;br /&gt;
The same Whisper workflow, but using an AMD GPU with the ROCm stack.&lt;br /&gt;
&lt;br /&gt;
==== The Definition File ====&lt;br /&gt;
&lt;br /&gt;
Create a file called &amp;lt;code&amp;gt;whisper_amd.def&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Bootstrap: docker&lt;br /&gt;
From: rocm/pytorch:rocm6.2.4_ubuntu22.04_py3.10_pytorch_release_2.5.0&lt;br /&gt;
&lt;br /&gt;
%post&lt;br /&gt;
    apt-get update&lt;br /&gt;
    apt-get install -y ffmpeg git&lt;br /&gt;
    pip install openai-whisper&lt;br /&gt;
    apt-get clean&lt;br /&gt;
&lt;br /&gt;
%environment&lt;br /&gt;
    export LC_ALL=C&lt;br /&gt;
&lt;br /&gt;
%runscript&lt;br /&gt;
    exec whisper &amp;quot;$@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
%help&lt;br /&gt;
    Whisper speech recognition container (AMD ROCm GPU).&lt;br /&gt;
    Usage: apptainer run --rocm whisper_amd.sif &amp;lt;audio_file&amp;gt; [options]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The structure is identical to the NVIDIA version. The only difference is the base image: instead of &amp;lt;code&amp;gt;pytorch/pytorch&amp;lt;/code&amp;gt; (which includes CUDA), we use &amp;lt;code&amp;gt;rocm/pytorch&amp;lt;/code&amp;gt; (which includes ROCm). PyTorch&#039;s API is the same regardless of the backend — &amp;lt;code&amp;gt;torch.cuda.is_available()&amp;lt;/code&amp;gt; returns &amp;lt;code&amp;gt;True&amp;lt;/code&amp;gt; on ROCm as well, since ROCm maps onto the CUDA API.&lt;br /&gt;
&lt;br /&gt;
==== Building the Image ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module reset&lt;br /&gt;
module load utilities Apptainer&lt;br /&gt;
apptainer build whisper_amd.sif whisper_amd.def&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Running Whisper ====&lt;br /&gt;
&lt;br /&gt;
Request an AMD GPU node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun --partition=gpu_amd --gres=gpu:1 --pty bash&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then load Apptainer and run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module reset&lt;br /&gt;
module load utilities Apptainer&lt;br /&gt;
apptainer run --rocm whisper_amd.sif /lustre/shared/hpcCourses/Whisper/audio.mp3 --model base --device cuda&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that even though we are on an AMD GPU, the &amp;lt;code&amp;gt;--device cuda&amp;lt;/code&amp;gt; flag is correct. PyTorch&#039;s ROCm backend uses the same &amp;lt;code&amp;gt;cuda&amp;lt;/code&amp;gt; device name for compatibility.&lt;br /&gt;
&lt;br /&gt;
Verify GPU access:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer exec --rocm whisper_amd.sif python -c &amp;quot;import torch; print(torch.cuda.is_available())&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! !! NVIDIA !! AMD&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Partition&#039;&#039;&#039; || &amp;lt;code&amp;gt;gpu&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;gpu_amd&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Apptainer flag&#039;&#039;&#039; || &amp;lt;code&amp;gt;--nv&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;--rocm&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Base image&#039;&#039;&#039; || &amp;lt;code&amp;gt;pytorch/pytorch&amp;lt;/code&amp;gt; (includes CUDA) || &amp;lt;code&amp;gt;rocm/pytorch&amp;lt;/code&amp;gt; (includes ROCm)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;PyTorch device&#039;&#039;&#039; || &amp;lt;code&amp;gt;--device cuda&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;--device cuda&amp;lt;/code&amp;gt; (same API)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Host devices bound&#039;&#039;&#039; || &amp;lt;code&amp;gt;/dev/nvidiaX&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;/dev/dri/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/dev/kfd&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The key takeaway: the only things that change between NVIDIA and AMD are the &#039;&#039;&#039;base container image&#039;&#039;&#039;, the &#039;&#039;&#039;Apptainer flag&#039;&#039;&#039;, and the &#039;&#039;&#039;Slurm partition&#039;&#039;&#039;. Your application code stays the same.&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-Introduction&amp;diff=2702</id>
		<title>Tutorials/Apptainer-Introduction</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-Introduction&amp;diff=2702"/>
		<updated>2026-03-25T09:23:54Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: /* apptainer pull */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction to Apptainer =&lt;br /&gt;
&lt;br /&gt;
== What is Apptainer? ==&lt;br /&gt;
&lt;br /&gt;
Apptainer (formerly known as Singularity) is a container platform designed for High Performance Computing (HPC) environments. If you have heard of Docker, Apptainer solves a similar problem — it lets you package an application together with all of its dependencies (libraries, tools, configuration) into a single portable unit called a &#039;&#039;&#039;container&#039;&#039;&#039;. The key difference is that Apptainer was built from the ground up to run safely on shared multi-user systems like HPC clusters, where Docker cannot be used because it requires root privileges that would pose a security risk.&lt;br /&gt;
&lt;br /&gt;
Some important differences between Apptainer and Docker:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! !! Apptainer !! Docker&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Privileges&#039;&#039;&#039; || Runs as a normal user — no root access needed || Requires root or membership in the &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt; group, which is effectively root&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Image format&#039;&#039;&#039; || Single portable &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; file || Layered images stored in a daemon&#039;s internal storage&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Integration with host&#039;&#039;&#039; || Seamless access to host filesystems, GPUs, and network by default || Isolated by default; explicit configuration needed to share resources&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Designed for&#039;&#039;&#039; || HPC, scientific computing, shared multi-user systems || Cloud, microservices, development environments&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Docker compatibility&#039;&#039;&#039; || Can pull and run Docker images directly || N/A&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Why Apptainer for Research? ===&lt;br /&gt;
&lt;br /&gt;
Two features make Apptainer particularly valuable for scientific work:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Portability:&#039;&#039;&#039; An Apptainer container is a single &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; file. You can build it on your laptop, copy it to the cluster, share it with a collaborator, or archive it alongside a publication. It will run the same way everywhere Apptainer is installed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Reproducibility:&#039;&#039;&#039; A container captures the exact software environment used for an analysis — down to the specific library versions. This means an experiment can be repeated months or years later with the same environment, even if the host system has changed. When combined with a definition file (a text recipe that describes how the container was built), every step is documented and reproducible.&lt;br /&gt;
&lt;br /&gt;
== Loading Apptainer ==&lt;br /&gt;
&lt;br /&gt;
On the Anunna HPC cluster, Apptainer is available in the &amp;lt;code&amp;gt;utilities&amp;lt;/code&amp;gt; module bucket. Load it with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module reset&lt;br /&gt;
module load utilities&lt;br /&gt;
module load Apptainer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify it is loaded by running:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer --version&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Best Practices ==&lt;br /&gt;
&lt;br /&gt;
=== Set Your Cache Directory ===&lt;br /&gt;
&lt;br /&gt;
Apptainer downloads container layers to a local cache before building SIF files. By default this cache lives under your home directory (&amp;lt;code&amp;gt;$HOME/.apptainer/cache&amp;lt;/code&amp;gt;), which can quickly exceed your home quota — especially with large images.&lt;br /&gt;
&lt;br /&gt;
Change the cache location to your scratch space by setting the &amp;lt;code&amp;gt;APPTAINER_CACHEDIR&amp;lt;/code&amp;gt; variable. You will need to create the directory first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir -p $myScratch/Apptainer&lt;br /&gt;
export APPTAINER_CACHEDIR=$myScratch/Apptainer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Consider adding the &amp;lt;code&amp;gt;export&amp;lt;/code&amp;gt; line to your &amp;lt;code&amp;gt;~/.bashrc&amp;lt;/code&amp;gt; so it is set automatically in every session.&lt;br /&gt;
&lt;br /&gt;
=== Do Not Run Apptainer on the Login Nodes ===&lt;br /&gt;
&lt;br /&gt;
Building and running containers can be resource-intensive. Always request a compute node (e.g. via &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;) before running Apptainer commands. The login nodes are shared and should not be used for heavy workloads.&lt;br /&gt;
&lt;br /&gt;
=== Do Not Store Images in Your Home Directory ===&lt;br /&gt;
&lt;br /&gt;
SIF files can easily be hundreds of megabytes or even several gigabytes in size. Store them on Lustre (e.g. in your scratch or project space) rather than in your home directory to avoid quota issues. Running images can be I/O intensive and this is not suitable for the home directory.&lt;br /&gt;
&lt;br /&gt;
== Basic Commands ==&lt;br /&gt;
&lt;br /&gt;
Apptainer has five core commands you will use regularly:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;apptainer pull&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Downloads a container image from a remote registry and saves it as a &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; file. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer pull ubuntu.sif docker://ubuntu:18.04&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;apptainer build&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The build command is used for converting images from one format to another. It can create a SIF from a definition file, convert a sandbox to a SIF, or convert between formats.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Build from a definition file&lt;br /&gt;
apptainer build myimage.sif myrecipe.def&lt;br /&gt;
&lt;br /&gt;
# Convert a sandbox directory to a SIF&lt;br /&gt;
apptainer build myimage.sif /path/to/sandbox/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;apptainer exec&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Runs a single specific command inside a container and returns the output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer exec ubuntu.sif cat /etc/os-release&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;apptainer shell&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Opens an interactive shell inside the container, allowing you to explore and run commands as if you had logged into a different machine.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer shell ubuntu.sif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;apptainer run&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Executes the container&#039;s default action (its &#039;&#039;&#039;runscript&#039;&#039;&#039;). What this does depends on how the container was built.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer run myimage.sif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== At a Glance ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apptainer pull&amp;lt;/code&amp;gt; || Download an image from a registry&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apptainer build&amp;lt;/code&amp;gt; || Build an image from a definition file or sandbox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apptainer exec&amp;lt;/code&amp;gt; || Run a single command inside a container&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apptainer shell&amp;lt;/code&amp;gt; || Open an interactive shell inside a container&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apptainer run&amp;lt;/code&amp;gt; || Run the container&#039;s default action&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-Introduction&amp;diff=2701</id>
		<title>Tutorials/Apptainer-Introduction</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-Introduction&amp;diff=2701"/>
		<updated>2026-03-25T09:18:12Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: Created page with &amp;quot;= Introduction to Apptainer =  == What is Apptainer? ==  Apptainer (formerly known as Singularity) is a container platform designed for High Performance Computing (HPC) environments. If you have heard of Docker, Apptainer solves a similar problem — it lets you package an application together with all of its dependencies (libraries, tools, configuration) into a single portable unit called a &amp;#039;&amp;#039;&amp;#039;container&amp;#039;&amp;#039;&amp;#039;. The key difference is that Apptainer was built from the ground...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction to Apptainer =&lt;br /&gt;
&lt;br /&gt;
== What is Apptainer? ==&lt;br /&gt;
&lt;br /&gt;
Apptainer (formerly known as Singularity) is a container platform designed for High Performance Computing (HPC) environments. If you have heard of Docker, Apptainer solves a similar problem — it lets you package an application together with all of its dependencies (libraries, tools, configuration) into a single portable unit called a &#039;&#039;&#039;container&#039;&#039;&#039;. The key difference is that Apptainer was built from the ground up to run safely on shared multi-user systems like HPC clusters, where Docker cannot be used because it requires root privileges that would pose a security risk.&lt;br /&gt;
&lt;br /&gt;
Some important differences between Apptainer and Docker:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! !! Apptainer !! Docker&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Privileges&#039;&#039;&#039; || Runs as a normal user — no root access needed || Requires root or membership in the &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt; group, which is effectively root&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Image format&#039;&#039;&#039; || Single portable &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; file || Layered images stored in a daemon&#039;s internal storage&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Integration with host&#039;&#039;&#039; || Seamless access to host filesystems, GPUs, and network by default || Isolated by default; explicit configuration needed to share resources&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Designed for&#039;&#039;&#039; || HPC, scientific computing, shared multi-user systems || Cloud, microservices, development environments&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Docker compatibility&#039;&#039;&#039; || Can pull and run Docker images directly || N/A&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Why Apptainer for Research? ===&lt;br /&gt;
&lt;br /&gt;
Two features make Apptainer particularly valuable for scientific work:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Portability:&#039;&#039;&#039; An Apptainer container is a single &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; file. You can build it on your laptop, copy it to the cluster, share it with a collaborator, or archive it alongside a publication. It will run the same way everywhere Apptainer is installed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Reproducibility:&#039;&#039;&#039; A container captures the exact software environment used for an analysis — down to the specific library versions. This means an experiment can be repeated months or years later with the same results, even if the host system has changed. When combined with a definition file (a text recipe that describes how the container was built), every step is documented and reproducible.&lt;br /&gt;
&lt;br /&gt;
== Loading Apptainer ==&lt;br /&gt;
&lt;br /&gt;
On the Anunna HPC cluster, Apptainer is available in the &amp;lt;code&amp;gt;utilities&amp;lt;/code&amp;gt; module bucket. Load it with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module reset&lt;br /&gt;
module load utilities Apptainer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can verify it is loaded by running:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer --version&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Best Practices ==&lt;br /&gt;
&lt;br /&gt;
=== Set Your Cache Directory ===&lt;br /&gt;
&lt;br /&gt;
Apptainer downloads container layers to a local cache before building SIF files. By default this cache lives under your home directory (&amp;lt;code&amp;gt;$HOME/.apptainer/cache&amp;lt;/code&amp;gt;), which can quickly exceed your home quota — especially with large images.&lt;br /&gt;
&lt;br /&gt;
Change the cache location to your scratch space by setting the &amp;lt;code&amp;gt;APPTAINER_CACHEDIR&amp;lt;/code&amp;gt; variable. You will need to create the directory first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir -p $myScratch/Apptainer&lt;br /&gt;
export APPTAINER_CACHEDIR=$myScratch/Apptainer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Consider adding the &amp;lt;code&amp;gt;export&amp;lt;/code&amp;gt; line to your &amp;lt;code&amp;gt;~/.bashrc&amp;lt;/code&amp;gt; so it is set automatically in every session.&lt;br /&gt;
&lt;br /&gt;
=== Do Not Run Apptainer on the Login Nodes ===&lt;br /&gt;
&lt;br /&gt;
Building and running containers can be resource-intensive. Always request a compute node (e.g. via &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;) before running Apptainer commands. The login nodes are shared and should not be used for heavy workloads.&lt;br /&gt;
&lt;br /&gt;
=== Do Not Store Images in Your Home Directory ===&lt;br /&gt;
&lt;br /&gt;
SIF files can easily be hundreds of megabytes or even several gigabytes in size. Store them on Lustre (e.g. in your scratch or project space) rather than in your home directory to avoid quota issues.&lt;br /&gt;
&lt;br /&gt;
== Basic Commands ==&lt;br /&gt;
&lt;br /&gt;
Apptainer has five core commands you will use regularly:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;apptainer pull&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Downloads a container image from a remote registry and saves it as a &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; file. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer pull ubuntu.sif docker://ubuntu:24.04&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;apptainer build&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The build command is used for converting images from one format to another. It can create a SIF from a definition file, convert a sandbox to a SIF, or convert between formats.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Build from a definition file&lt;br /&gt;
apptainer build myimage.sif myrecipe.def&lt;br /&gt;
&lt;br /&gt;
# Convert a sandbox directory to a SIF&lt;br /&gt;
apptainer build myimage.sif /path/to/sandbox/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;apptainer exec&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Runs a single specific command inside a container and returns the output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer exec ubuntu.sif cat /etc/os-release&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;apptainer shell&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Opens an interactive shell inside the container, allowing you to explore and run commands as if you had logged into a different machine.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer shell ubuntu.sif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;apptainer run&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Executes the container&#039;s default action (its &#039;&#039;&#039;runscript&#039;&#039;&#039;). What this does depends on how the container was built.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer run myimage.sif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== At a Glance ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apptainer pull&amp;lt;/code&amp;gt; || Download an image from a registry&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apptainer build&amp;lt;/code&amp;gt; || Build an image from a definition file or sandbox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apptainer exec&amp;lt;/code&amp;gt; || Run a single command inside a container&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apptainer shell&amp;lt;/code&amp;gt; || Open an interactive shell inside a container&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apptainer run&amp;lt;/code&amp;gt; || Run the container&#039;s default action&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Main_Page&amp;diff=2700</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Main_Page&amp;diff=2700"/>
		<updated>2026-03-25T06:56:50Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: Add tutorials section  and edited the heading of the courses section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Anunna is a [http://en.wikipedia.org/wiki/High-performance_computing High Performance Computer] (HPC) infrastructure hosted by [https://www.wur.nl/en/show/supercomputer-anunna-opens-up-more-opportunities-for-data-storage-and-artificial-intelligence-applications.htm Wageningen University &amp;amp; Research Centre]. It is open for use for all WUR research groups as well as other organizations, including companies, that have collaborative projects with WUR. &lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
&lt;br /&gt;
* [[History of the Cluster|Historical information on the startup of Anunna]]&lt;br /&gt;
&lt;br /&gt;
== Access Policy ==&lt;br /&gt;
[[Access_Policy | Main Article: Access Policy]]&lt;br /&gt;
&lt;br /&gt;
Access needs to be granted actively (by creation of an account on the cluster by FB-IT). Use of resources is limited by the scheduler. Note that the use of Anunna is not free of charge. &lt;br /&gt;
&lt;br /&gt;
= Our Courses and Tutorials =&lt;br /&gt;
The Anunna team organizes HPC courses three times a year to strengthen basic &amp;amp; more advanced skills and enable users to make the most effective use of our facility.&lt;br /&gt;
&lt;br /&gt;
* [[Linux Basic]]&lt;br /&gt;
* [[HPC Basic]]&lt;br /&gt;
* [[HPC Advanced]]&lt;br /&gt;
* [[2026 Course dates]]&lt;br /&gt;
* [[Tutorials]]&lt;br /&gt;
&lt;br /&gt;
= Using Anunna =&lt;br /&gt;
* [[Tariffs | Costs associated with resource usage]]&lt;br /&gt;
&lt;br /&gt;
== Gaining access to Anunna==&lt;br /&gt;
Access to the cluster and file transfer are traditionally done via [http://en.wikipedia.org/wiki/Secure_Shell SSH and SFTP].&lt;br /&gt;
* [[log_in_to_B4F_cluster | Logging into cluster using ssh]]&lt;br /&gt;
* [[file_transfer | File transfer options]]&lt;br /&gt;
* [[Services | Alternative access methods, and extra features and services on Anunna]]&lt;br /&gt;
* [[Filesystems | Data storage methods on Anunna]]&lt;br /&gt;
&lt;br /&gt;
== Using Anunna for courses (mainly jupyter notebooks) ==&lt;br /&gt;
* [[steps_for_courses | Steps involved to run a course on Anunna]]&lt;br /&gt;
 &lt;br /&gt;
= Events =&lt;br /&gt;
&lt;br /&gt;
* [[Courses]] that have happened and are happening&lt;br /&gt;
* [[Downtime]] that will affect all users&lt;br /&gt;
* [[Meetings]] that may affect the policies of Anunna&lt;br /&gt;
&lt;br /&gt;
= Software =&lt;br /&gt;
* [[Modules]]&lt;br /&gt;
* [[Apptainer]]&lt;br /&gt;
* [[Python]]&lt;br /&gt;
* [[R]] &lt;br /&gt;
* [[Julia]]&lt;br /&gt;
&lt;br /&gt;
== Browser apps ==&lt;br /&gt;
This page provides an overview of the GUI-based applications available Anunna, including background information and practical guidance on how to access and use interactive desktops and graphical tools directly from your web browser.&lt;br /&gt;
&lt;br /&gt;
* [[General overview|General Overview]]&lt;br /&gt;
* [[Anunna Shell Access]]&lt;br /&gt;
* [[Using the File browser|File Browser]]&lt;br /&gt;
* [[Jupyter|Featured Apps]]&lt;br /&gt;
* [[Jupyter]]&lt;br /&gt;
* [[RStudio|R Studio]]&lt;br /&gt;
* [[Linux desktop|Linux Desktop]]&lt;br /&gt;
* [[Requesting new software|Requesting New Software]]&lt;br /&gt;
&lt;br /&gt;
== Command-line Software ==&lt;br /&gt;
&lt;br /&gt;
==== Cluster Scheduler ====&lt;br /&gt;
Anunna uses Slurm as job scheduler.&lt;br /&gt;
* [[Using_Slurm | Submit jobs with Slurm]]&lt;br /&gt;
* [[node_usage_graph | Be aware of how much work the cluster is under right now with &#039;node_usage_graph&#039;]]&lt;br /&gt;
* [[SLURM_Compare | Rosetta Stone of Workload Managers]]&lt;br /&gt;
&lt;br /&gt;
==== [[Globally installed software]] ====&lt;br /&gt;
&lt;br /&gt;
==== [[ABGC_modules |ABGC specific modules]] ====&lt;br /&gt;
&lt;br /&gt;
==== Installation of software by users ====&lt;br /&gt;
* [[Domain_specific_software_on_B4Fcluster_installation_by_users | Installing domain specific software: installation by users]]&lt;br /&gt;
* [[Setting local variables]]&lt;br /&gt;
* [[Installing_R_packages_locally | Installing R packages locally]]&lt;br /&gt;
* [[Setting_up_Python_virtualenv | Setting up and using a virtual environment for Python3 ]]&lt;br /&gt;
* [[Virtual_environment_Python_3.4_or_higher | Setting up and using a virtual environment for Python3.4 or higher ]]&lt;br /&gt;
* [[Installing WRF and WPS]]&lt;br /&gt;
* [[Running scripts on a fixed timeschedule (cron)]]&lt;br /&gt;
&lt;br /&gt;
= Useful Notes = &lt;br /&gt;
&lt;br /&gt;
== Being in control of Environment parameters ==&lt;br /&gt;
&lt;br /&gt;
* [[Using_environment_modules | Using environment modules]]&lt;br /&gt;
* [[Aliases and local variables]]&lt;br /&gt;
* [[Setting local variables]]&lt;br /&gt;
* [[Setting_TMPDIR | Set a custom temporary directory location]]&lt;br /&gt;
* [[Installing_R_packages_locally | Installing R packages locally]]&lt;br /&gt;
* [[Setting_up_Python_virtualenv | Setting up and using a virtual environment for Python3 ]]&lt;br /&gt;
* [[Locale_settings]] (how numbers and dates are displayed)&lt;br /&gt;
&lt;br /&gt;
== Controlling costs ==&lt;br /&gt;
&lt;br /&gt;
* [[SACCT | using SACCT to see your costs]]&lt;br /&gt;
* [[get_my_bill | using the &amp;quot;get_my_bill&amp;quot; script to estimate costs]]&lt;br /&gt;
&lt;br /&gt;
== Management ==&lt;br /&gt;
Product Owner of Anunna is Alexander van Ittersum (Wageningen UR,FB-IT, C&amp;amp;PS). [[User: prins089 | Fons Prinsen (Wageningen UR, FB-IT, C&amp;amp;PS)]] is responsible for [[Maintenance_and_Management | Maintenance and Management]] of the cluster.&lt;br /&gt;
&lt;br /&gt;
* [[Roadmap | Ambitions regarding innovation, support and administration of Anunna ]]&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
* [[Bioinformatics_tips_tricks_workflows |Bioinformatics tips, tricks, and workflows]]&lt;br /&gt;
* [[Parallel_R_code_on_SLURM | Running parallel R code on SLURM]]&lt;br /&gt;
* [[Convert_between_MediaWiki_and_other_formats | Convert between MediaWiki format and other formats]]&lt;br /&gt;
* [[Manual GitLab | GitLab: Create projects and add scripts]]&lt;br /&gt;
* [[Monitoring_executions | Monitoring job execution]]&lt;br /&gt;
* [[Shared_folders | Working with shared folders in the Lustre file system]]&lt;br /&gt;
* [[Old_binaries | Running older binaries on the updated OS]]&lt;br /&gt;
* [[locale_settings | How to change language settings for yourself]]&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[Maintenance_and_Management | Maintenance and Management]]&lt;br /&gt;
* [[About_ABGC | About ABGC]]&lt;br /&gt;
* [[Computer_cluster | High Performance Computing @ABGC]]&lt;br /&gt;
* [[Lustre_PFS_layout | Lustre Parallel File System layout]]&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
{| width=&amp;quot;90%&amp;quot;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| width=&amp;quot;30%&amp;quot; |&lt;br /&gt;
* [https://www.wur.nl/en/Value-Creation-Cooperation/Facilities/Wageningen-Shared-Research-Facilities/Our-facilities/Show/High-Performance-Computing-Cluster-HPC-Anunna.htm SRF offers a HPC facilty]&lt;br /&gt;
| width=&amp;quot;30%&amp;quot; |&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Scientific_Linux Scientific Linux]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Help:Cheatsheet Help with editing Wiki pages]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-FakerootAndOverlays&amp;diff=2699</id>
		<title>Tutorials/Apptainer-FakerootAndOverlays</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-FakerootAndOverlays&amp;diff=2699"/>
		<updated>2026-03-25T06:54:45Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Apptainer Overlays: Modifying Container Images =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; Before you begin, make sure the following are in place:&lt;br /&gt;
&lt;br /&gt;
* You are running on a &#039;&#039;&#039;compute node&#039;&#039;&#039;, not a login node. Request an interactive session first (e.g. via &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; or your scheduler).&lt;br /&gt;
* Your &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; image files should be stored on &#039;&#039;&#039;Lustre&#039;&#039;&#039; (e.g. in your scratch space), not in your home directory. SIF files can be large and will eat through your home quota fast.&lt;br /&gt;
* Set your Apptainer cache to Lustre as well. Add this to your session (or your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export APPTAINER_CACHEDIR=$myScratch/apptainer_cache&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
Load the required modules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module reset&lt;br /&gt;
module load utilities Apptainer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pulling the Base Image ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s pull an Ubuntu 24.04 image from Docker Hub:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer pull ./ubuntu_24.04.sif docker://ubuntu:24.04&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will download and convert the image into a SIF file in your current directory.&lt;br /&gt;
&lt;br /&gt;
== The Problem: SIF Images Are Read-Only ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s try to update the package list inside the container:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer exec ubuntu_24.04.sif apt update&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will fail. You will see errors about not being able to write to package lists and lock files. This is because SIF files are &#039;&#039;&#039;read-only&#039;&#039;&#039; by design — you cannot modify them directly.&lt;br /&gt;
&lt;br /&gt;
So how do we install software into a container? This is where &#039;&#039;&#039;overlays&#039;&#039;&#039; and &#039;&#039;&#039;fakeroot&#039;&#039;&#039; come in.&lt;br /&gt;
&lt;br /&gt;
== What is fakeroot? ==&lt;br /&gt;
&lt;br /&gt;
On an HPC system you do not have root (administrator) privileges. But many operations inside a container — like installing packages with &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; — expect to be run as root.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--fakeroot&amp;lt;/code&amp;gt; flag (or &amp;lt;code&amp;gt;-f&amp;lt;/code&amp;gt;) tells Apptainer to make it &#039;&#039;look like&#039;&#039; you are running as root inside the container, even though you are not actually root on the host system. This is enough to trick package managers like &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; into working.&lt;br /&gt;
&lt;br /&gt;
== What is an Overlay? ==&lt;br /&gt;
&lt;br /&gt;
An overlay is a writable layer that sits on top of a read-only SIF image. Think of it like putting a sheet of tracing paper over a printed page — you can write on the tracing paper without changing the original page underneath.&lt;br /&gt;
&lt;br /&gt;
Any changes you make (installed packages, new files, config changes) are stored in the overlay, leaving the original SIF image untouched.&lt;br /&gt;
&lt;br /&gt;
== Creating and Using an Overlay ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s create a temporary directory to use as our overlay:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ov=$(mktemp -d)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This creates a temporary directory somewhere under &amp;lt;code&amp;gt;/tmp&amp;lt;/code&amp;gt; and stores the path in the variable &amp;lt;code&amp;gt;$ov&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s try that &amp;lt;code&amp;gt;apt update&amp;lt;/code&amp;gt; again, this time with &amp;lt;code&amp;gt;--fakeroot&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--overlay&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer exec --fakeroot --overlay $ov ubuntu_24.04.sif apt update&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This time it should work. Apptainer is running you as fake root, and any writes are going into the overlay directory instead of trying to modify the read-only SIF.&lt;br /&gt;
&lt;br /&gt;
== Installing Software via the Overlay ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s install &amp;lt;code&amp;gt;neofetch&amp;lt;/code&amp;gt; (a tool that displays system information) into the container through the overlay:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer exec --fakeroot --overlay $ov ubuntu_24.04.sif apt install -y neofetch&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-y&amp;lt;/code&amp;gt; flag tells &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; to answer &amp;quot;yes&amp;quot; to all prompts automatically.&lt;br /&gt;
&lt;br /&gt;
Once this completes, neofetch is installed — but only in the overlay. The original &amp;lt;code&amp;gt;ubuntu_24.04.sif&amp;lt;/code&amp;gt; is still untouched.&lt;br /&gt;
&lt;br /&gt;
The takeaway tis that the an overlay enables a read-only image to be &amp;quot;modified&amp;quot; at runtime. This enables the use of applications that dowlooad data, e.g. databases at runtime. &lt;br /&gt;
&lt;br /&gt;
== Cleaning Up ==&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to remove the temporary overlay directory when you&#039;re done:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
rm -rf $ov&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Step !! Command&lt;br /&gt;
|-&lt;br /&gt;
| Pull base image || &amp;lt;code&amp;gt;apptainer pull ./ubuntu_24.04.sif docker://ubuntu:24.04&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Create overlay directory || &amp;lt;code&amp;gt;ov=$(mktemp -d)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Update packages (with overlay + fakeroot) || &amp;lt;code&amp;gt;apptainer exec --fakeroot --overlay $ov ubuntu_24.04.sif apt update&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Install software || &amp;lt;code&amp;gt;apptainer exec --fakeroot --overlay $ov ubuntu_24.04.sif apt install -y neofetch&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Clean up overlay || &amp;lt;code&amp;gt;rm -rf $ov&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials&amp;diff=2686</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials&amp;diff=2686"/>
		<updated>2026-03-12T13:18:36Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Tutorials ==&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
[[Create Your Own Modules]]&lt;br /&gt;
&lt;br /&gt;
=== Apptainer ===&lt;br /&gt;
&lt;br /&gt;
* [[Tutorials/Apptainer-PullingImages|Pulling Images]]&lt;br /&gt;
* [[Tutorials/Apptainer-FakerootAndOverlays|Fakeroot and overlays]]&lt;br /&gt;
* [[Tutorials/Apptainer-FakerootAndSandbox|Fakeroot  and sandbox]]&lt;br /&gt;
* [[Tutorials/Apptainer-DefinitionFiles|Definition Files]]&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-DefinitionFiles&amp;diff=2685</id>
		<title>Tutorials/Apptainer-DefinitionFiles</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-DefinitionFiles&amp;diff=2685"/>
		<updated>2026-03-12T12:32:44Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: Created page with &amp;quot;= Apptainer Definition Files: Building Containers from a Recipe =  &amp;#039;&amp;#039;&amp;#039;Important:&amp;#039;&amp;#039;&amp;#039; Before you begin, make sure the following are in place:  * You are running on a &amp;#039;&amp;#039;&amp;#039;compute node&amp;#039;&amp;#039;&amp;#039;, not a login node. Request an interactive session first (e.g. via &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; or your scheduler). * Your &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; image files should be stored on &amp;#039;&amp;#039;&amp;#039;Lustre&amp;#039;&amp;#039;&amp;#039; (e.g. in your scratch space), not in your home directory. SIF files can be large and will eat through your home quota...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Apptainer Definition Files: Building Containers from a Recipe =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; Before you begin, make sure the following are in place:&lt;br /&gt;
&lt;br /&gt;
* You are running on a &#039;&#039;&#039;compute node&#039;&#039;&#039;, not a login node. Request an interactive session first (e.g. via &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; or your scheduler).&lt;br /&gt;
* Your &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; image files should be stored on &#039;&#039;&#039;Lustre&#039;&#039;&#039; (e.g. in your scratch space), not in your home directory. SIF files can be large and will eat through your home quota fast.&lt;br /&gt;
* Set your Apptainer cache to Lustre as well. Add this to your session (or your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export APPTAINER_CACHEDIR=$myScratch/apptainer_cache&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
Load the required modules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module reset&lt;br /&gt;
module load utilities Apptainer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What is a Definition File? ==&lt;br /&gt;
&lt;br /&gt;
In the previous tutorials we modified containers by hand — either through overlays or by entering a sandbox and running commands interactively. That works, but it has a problem: if someone else (or future you) wants to know exactly what was changed, there is no record of the steps taken.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;definition file&#039;&#039;&#039; (sometimes called a &amp;quot;def file&amp;quot; or &amp;quot;recipe&amp;quot;) solves this. It is a plain text file that describes, step by step, how to build a container from scratch. Think of it like a cooking recipe: it lists the base ingredients and every instruction needed to produce the final result. Anyone with the same definition file can reproduce the exact same container.&lt;br /&gt;
&lt;br /&gt;
== The Definition File ==&lt;br /&gt;
&lt;br /&gt;
Create a file called &amp;lt;code&amp;gt;cowsay.def&amp;lt;/code&amp;gt; with the following contents:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Bootstrap: docker&lt;br /&gt;
From: ubuntu:24.04&lt;br /&gt;
&lt;br /&gt;
%post&lt;br /&gt;
    apt-get update&lt;br /&gt;
    apt-get install -y cowsay fortune-mod&lt;br /&gt;
    apt-get clean&lt;br /&gt;
&lt;br /&gt;
%environment&lt;br /&gt;
    export PATH=/usr/games:${PATH}&lt;br /&gt;
&lt;br /&gt;
%runscript&lt;br /&gt;
    fortune | cowsay&lt;br /&gt;
    exec &amp;quot;$@&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s walk through each section.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;Bootstrap&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;From&amp;lt;/code&amp;gt; (the Header) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Bootstrap: docker&lt;br /&gt;
From: ubuntu:24.04&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The header tells Apptainer where to get the base image to start from. &amp;lt;code&amp;gt;Bootstrap: docker&amp;lt;/code&amp;gt; means we are pulling from a Docker/OCI registry, and &amp;lt;code&amp;gt;From: ubuntu:24.04&amp;lt;/code&amp;gt; specifies which image. This is equivalent to the &amp;lt;code&amp;gt;apptainer pull docker://ubuntu:24.04&amp;lt;/code&amp;gt; command we used in the earlier tutorials.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;%post&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
%post&lt;br /&gt;
    apt-get update&lt;br /&gt;
    apt-get install -y cowsay fortune-mod&lt;br /&gt;
    apt-get clean&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;%post&amp;lt;/code&amp;gt; section contains commands that run &#039;&#039;&#039;inside the container at build time&#039;&#039;&#039;, as root. This is where you install software, download data, compile code, or make any other modifications to the container&#039;s filesystem. It is the equivalent of what we did interactively inside the sandbox shell.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;%environment&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
%environment&lt;br /&gt;
    export PATH=/usr/games:${PATH}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;%environment&amp;lt;/code&amp;gt; section defines environment variables that are set every time the container runs. Here we add &amp;lt;code&amp;gt;/usr/games&amp;lt;/code&amp;gt; to the PATH so that &amp;lt;code&amp;gt;cowsay&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;fortune&amp;lt;/code&amp;gt; can be found. This replaces the manual &amp;lt;code&amp;gt;echo&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;90-environment.sh&amp;lt;/code&amp;gt; that we did in the sandbox tutorial.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;%runscript&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
%runscript&lt;br /&gt;
    fortune | cowsay&lt;br /&gt;
    exec &amp;quot;$@&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;%runscript&amp;lt;/code&amp;gt; section defines the default action when someone uses &amp;lt;code&amp;gt;apptainer run&amp;lt;/code&amp;gt; on the container. This replaces the manual edit we made to the runscript file in the sandbox tutorial. The &amp;lt;code&amp;gt;exec &amp;quot;$@&amp;quot;&amp;lt;/code&amp;gt; line at the end allows the container to accept additional arguments if needed.&lt;br /&gt;
&lt;br /&gt;
== Building the Image ==&lt;br /&gt;
&lt;br /&gt;
With the definition file in place, build the SIF image:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer build cowsay.sif cowsay.def&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apptainer will pull the base Ubuntu image, run the &amp;lt;code&amp;gt;%post&amp;lt;/code&amp;gt; commands to install the software, set up the environment and runscript, and package everything into &amp;lt;code&amp;gt;cowsay.sif&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Running It ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer run cowsay.sif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see a random fortune inside a cow speech bubble:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
 ________________________________________&lt;br /&gt;
/ You will be awarded some great honor.  \&lt;br /&gt;
\                                        /&lt;br /&gt;
 ----------------------------------------&lt;br /&gt;
        \   ^__^&lt;br /&gt;
         \  (oo)\_______&lt;br /&gt;
            (__)\       )\/\&lt;br /&gt;
                ||----w |&lt;br /&gt;
                ||     ||&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The same result as the sandbox tutorial — but this time, every step is documented in a single file that anyone can inspect and reproduce.&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Step !! Command&lt;br /&gt;
|-&lt;br /&gt;
| Create the definition file || Write &amp;lt;code&amp;gt;cowsay.def&amp;lt;/code&amp;gt; (see above)&lt;br /&gt;
|-&lt;br /&gt;
| Build the image || &amp;lt;code&amp;gt;apptainer build cowsay.sif cowsay.def&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Run it || &amp;lt;code&amp;gt;apptainer run cowsay.sif&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Definition File Sections at a Glance ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Section !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Bootstrap&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;From&amp;lt;/code&amp;gt; || Where to get the base image (the starting point)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;%post&amp;lt;/code&amp;gt; || Commands to run inside the container at build time (install software, configure things)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;%environment&amp;lt;/code&amp;gt; || Environment variables set every time the container runs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;%runscript&amp;lt;/code&amp;gt; || The default command executed by &amp;lt;code&amp;gt;apptainer run&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-FakerootAndSandbox&amp;diff=2684</id>
		<title>Tutorials/Apptainer-FakerootAndSandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-FakerootAndSandbox&amp;diff=2684"/>
		<updated>2026-03-12T12:22:43Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: Created page with &amp;quot;= Apptainer Sandbox: Modifying Containers Interactively =  &amp;#039;&amp;#039;&amp;#039;Important:&amp;#039;&amp;#039;&amp;#039; Before you begin, make sure the following are in place:  * You are running on a &amp;#039;&amp;#039;&amp;#039;compute node&amp;#039;&amp;#039;&amp;#039;, not a login node. Request an interactive session first (e.g. via &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; or your scheduler). * Your &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; image files should be stored on &amp;#039;&amp;#039;&amp;#039;Lustre&amp;#039;&amp;#039;&amp;#039; (e.g. in your scratch space), not in your home directory. SIF files can be large and will eat through your home quota fast. *...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Apptainer Sandbox: Modifying Containers Interactively =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; Before you begin, make sure the following are in place:&lt;br /&gt;
&lt;br /&gt;
* You are running on a &#039;&#039;&#039;compute node&#039;&#039;&#039;, not a login node. Request an interactive session first (e.g. via &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; or your scheduler).&lt;br /&gt;
* Your &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; image files should be stored on &#039;&#039;&#039;Lustre&#039;&#039;&#039; (e.g. in your scratch space), not in your home directory. SIF files can be large and will eat through your home quota fast.&lt;br /&gt;
* Set your Apptainer cache to Lustre as well. Add this to your session (or your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export APPTAINER_CACHEDIR=$myScratch/apptainer_cache&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
Load the required modules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module reset&lt;br /&gt;
module load utilities Apptainer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What is a Sandbox? ==&lt;br /&gt;
&lt;br /&gt;
In the previous tutorial we used overlays to make changes on top of a read-only SIF image. Another approach is to convert the image into a &#039;&#039;&#039;sandbox&#039;&#039;&#039; — a regular directory on disk that contains the full filesystem of the container. Because it is just a directory, you can write to it directly.&lt;br /&gt;
&lt;br /&gt;
This makes it easy to interactively install software, edit config files, and generally tinker with the container before converting it back into a portable SIF file.&lt;br /&gt;
&lt;br /&gt;
== Pulling as a Sandbox ==&lt;br /&gt;
&lt;br /&gt;
First, create a temporary directory and pull the Ubuntu 24.04 image directly as a sandbox:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sandbox=$(mktemp -d)&lt;br /&gt;
apptainer pull $sandbox/ubuntu --sandbox docker://ubuntu:24.04&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of producing a single &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; file, this creates a directory at &amp;lt;code&amp;gt;$sandbox/ubuntu&amp;lt;/code&amp;gt; that contains the entire container filesystem. You can &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; it to see the familiar Linux directory structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ls $sandbox/ubuntu&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see directories like &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;etc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;usr&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;var&amp;lt;/code&amp;gt;, and so on — just like a normal Linux root filesystem.&lt;br /&gt;
&lt;br /&gt;
== Entering the Sandbox ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s open an interactive shell inside the sandbox:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer shell --containall --writable --fakeroot $sandbox/ubuntu&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We are using three flags here, each doing something important:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Flag !! What it does&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--containall&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;-C&amp;lt;/code&amp;gt;) || Fully isolates the container from the host system. Your home directory, host environment variables, and host filesystems are &#039;&#039;&#039;not&#039;&#039;&#039; mounted into the container. This gives you a clean environment.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--writable&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;-w&amp;lt;/code&amp;gt;) || Allows you to make changes to the container&#039;s filesystem. Without this flag, even a sandbox would be mounted read-only.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--fakeroot&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;-f&amp;lt;/code&amp;gt;) || Makes it look like you are running as root inside the container. This is needed because package managers like &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; expect root privileges to install software.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Your prompt should change to &amp;lt;code&amp;gt;Apptainer&amp;gt;&amp;lt;/code&amp;gt;, indicating you are now inside the container.&lt;br /&gt;
&lt;br /&gt;
== Installing Software ==&lt;br /&gt;
&lt;br /&gt;
From inside the container, update the package lists and install &amp;lt;code&amp;gt;nano&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cowsay&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;fortune-mod&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Apptainer&amp;gt; apt-get update&lt;br /&gt;
Apptainer&amp;gt; apt-get install -y nano cowsay fortune-mod&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the installation finishes, clean up the apt cache to keep the image small:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Apptainer&amp;gt; apt-get clean&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Fixing the PATH ==&lt;br /&gt;
&lt;br /&gt;
In Ubuntu, &amp;lt;code&amp;gt;cowsay&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;fortune&amp;lt;/code&amp;gt; are installed into &amp;lt;code&amp;gt;/usr/games/&amp;lt;/code&amp;gt;, which is &#039;&#039;&#039;not&#039;&#039;&#039; in the default PATH for non-interactive shells. If we were to build a SIF from this sandbox right now, running &amp;lt;code&amp;gt;fortune&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;cowsay&amp;lt;/code&amp;gt; would fail with a &amp;quot;command not found&amp;quot; error.&lt;br /&gt;
&lt;br /&gt;
We need to add &amp;lt;code&amp;gt;/usr/games&amp;lt;/code&amp;gt; to the container&#039;s PATH. Apptainer reads environment settings from files in &amp;lt;code&amp;gt;/.singularity.d/env/&amp;lt;/code&amp;gt;. Run this command inside the container:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Apptainer&amp;gt; echo &#039;export PATH=/usr/games:${PATH}&#039; &amp;gt;&amp;gt; /.singularity.d/env/90-environment.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This appends a line to the environment script that ensures &amp;lt;code&amp;gt;/usr/games&amp;lt;/code&amp;gt; is on the PATH every time the container runs.&lt;br /&gt;
&lt;br /&gt;
== Editing the Runscript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;runscript&#039;&#039;&#039; is the command that gets executed when you use &amp;lt;code&amp;gt;apptainer run&amp;lt;/code&amp;gt; on the container. It lives at &amp;lt;code&amp;gt;/.singularity.d/runscript&amp;lt;/code&amp;gt;. Let&#039;s edit it so that our container does something fun by default.&lt;br /&gt;
&lt;br /&gt;
Open the runscript with nano:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Apptainer&amp;gt; nano /.singularity.d/runscript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
OCI_ENTRYPOINT=&#039;&#039;&lt;br /&gt;
# ...various lines...&lt;br /&gt;
exec &amp;quot;$@&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add &amp;lt;code&amp;gt;fortune | cowsay&amp;lt;/code&amp;gt; on the line just &#039;&#039;&#039;above&#039;&#039;&#039; the final &amp;lt;code&amp;gt;exec &amp;quot;$@&amp;quot;&amp;lt;/code&amp;gt;, so the end of the file looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
fortune | cowsay&lt;br /&gt;
exec &amp;quot;$@&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save and exit nano (&amp;lt;code&amp;gt;Ctrl+O&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Enter&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Ctrl+X&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Now exit the container:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Apptainer&amp;gt; exit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building the Final SIF Image ==&lt;br /&gt;
&lt;br /&gt;
Convert the sandbox back into a portable SIF file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer build fortune.sif $sandbox/ubuntu&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compresses the entire sandbox directory into a single &amp;lt;code&amp;gt;fortune.sif&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
== Running It ==&lt;br /&gt;
&lt;br /&gt;
Now for the moment of truth:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer run fortune.sif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see a random fortune displayed inside a speech bubble from a friendly cow. Something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
 ________________________________________&lt;br /&gt;
/ You will be awarded some great honor. \&lt;br /&gt;
\                                        /&lt;br /&gt;
 ----------------------------------------&lt;br /&gt;
        \   ^__^&lt;br /&gt;
         \  (oo)\_______&lt;br /&gt;
            (__)\       )\/\&lt;br /&gt;
                ||----w |&lt;br /&gt;
                ||     ||&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every time you run it, you get a different fortune. &lt;br /&gt;
&lt;br /&gt;
== Cleaning Up ==&lt;br /&gt;
&lt;br /&gt;
Remove the temporary sandbox directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
rm -rf $sandbox&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Step !! Command&lt;br /&gt;
|-&lt;br /&gt;
| Create temp directory || &amp;lt;code&amp;gt;sandbox=$(mktemp -d)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Pull as sandbox || &amp;lt;code&amp;gt;apptainer pull $sandbox/ubuntu --sandbox docker://ubuntu:24.04&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Enter sandbox || &amp;lt;code&amp;gt;apptainer shell --containall --writable --fakeroot $sandbox/ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Install software || &amp;lt;code&amp;gt;apt-get update &amp;amp;&amp;amp; apt-get install -y nano cowsay fortune-mod &amp;amp;&amp;amp; apt-get clean&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Fix PATH || &amp;lt;code&amp;gt;echo &#039;export PATH=/usr/games:${PATH}&#039; &amp;gt;&amp;gt; /.singularity.d/env/90-environment.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Edit runscript || &amp;lt;code&amp;gt;nano /.singularity.d/runscript&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Exit container || &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Build SIF from sandbox || &amp;lt;code&amp;gt;apptainer build fortune.sif $sandbox/ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Run it || &amp;lt;code&amp;gt;apptainer run fortune.sif&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Clean up || &amp;lt;code&amp;gt;rm -rf $sandbox&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-FakerootAndOverlays&amp;diff=2682</id>
		<title>Tutorials/Apptainer-FakerootAndOverlays</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-FakerootAndOverlays&amp;diff=2682"/>
		<updated>2026-03-12T10:00:23Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: /* What is --fakeroot? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Apptainer Overlays: Modifying Container Images =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; Before you begin, make sure the following are in place:&lt;br /&gt;
&lt;br /&gt;
* You are running on a &#039;&#039;&#039;compute node&#039;&#039;&#039;, not a login node. Request an interactive session first (e.g. via &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; or your scheduler).&lt;br /&gt;
* Your &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; image files should be stored on &#039;&#039;&#039;Lustre&#039;&#039;&#039; (e.g. in your scratch space), not in your home directory. SIF files can be large and will eat through your home quota fast.&lt;br /&gt;
* Set your Apptainer cache to Lustre as well. Add this to your session (or your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export APPTAINER_CACHEDIR=$myScratch/apptainer_cache&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
Load the required modules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module reset&lt;br /&gt;
module load utilities Apptainer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pulling the Base Image ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s pull an Ubuntu 24.04 image from Docker Hub:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer pull ./ubuntu_24.04.sif docker://ubuntu:24.04&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will download and convert the image into a SIF file in your current directory.&lt;br /&gt;
&lt;br /&gt;
== The Problem: SIF Images Are Read-Only ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s try to update the package list inside the container:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer exec ubuntu_24.04.sif apt update&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will fail. You will see errors about not being able to write to package lists and lock files. This is because SIF files are &#039;&#039;&#039;read-only&#039;&#039;&#039; by design — you cannot modify them directly.&lt;br /&gt;
&lt;br /&gt;
So how do we install software into a container? This is where &#039;&#039;&#039;overlays&#039;&#039;&#039; and &#039;&#039;&#039;fakeroot&#039;&#039;&#039; come in.&lt;br /&gt;
&lt;br /&gt;
== What is fakeroot? ==&lt;br /&gt;
&lt;br /&gt;
On an HPC system you do not have root (administrator) privileges. But many operations inside a container — like installing packages with &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; — expect to be run as root.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--fakeroot&amp;lt;/code&amp;gt; flag (or &amp;lt;code&amp;gt;-f&amp;lt;/code&amp;gt;) tells Apptainer to make it &#039;&#039;look like&#039;&#039; you are running as root inside the container, even though you are not actually root on the host system. This is enough to trick package managers like &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; into working.&lt;br /&gt;
&lt;br /&gt;
== What is an Overlay? ==&lt;br /&gt;
&lt;br /&gt;
An overlay is a writable layer that sits on top of a read-only SIF image. Think of it like putting a sheet of tracing paper over a printed page — you can write on the tracing paper without changing the original page underneath.&lt;br /&gt;
&lt;br /&gt;
Any changes you make (installed packages, new files, config changes) are stored in the overlay, leaving the original SIF image untouched.&lt;br /&gt;
&lt;br /&gt;
== Creating and Using an Overlay ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s create a temporary directory to use as our overlay:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ov=$(mktemp -d)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This creates a temporary directory somewhere under &amp;lt;code&amp;gt;/tmp&amp;lt;/code&amp;gt; and stores the path in the variable &amp;lt;code&amp;gt;$ov&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s try that &amp;lt;code&amp;gt;apt update&amp;lt;/code&amp;gt; again, this time with &amp;lt;code&amp;gt;--fakeroot&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--overlay&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer exec --fakeroot --overlay $ov ubuntu_24.04.sif apt update&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This time it should work. Apptainer is running you as fake root, and any writes are going into the overlay directory instead of trying to modify the read-only SIF.&lt;br /&gt;
&lt;br /&gt;
== Installing Software via the Overlay ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s install &amp;lt;code&amp;gt;neofetch&amp;lt;/code&amp;gt; (a tool that displays system information) into the container through the overlay:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer exec --fakeroot --overlay $ov ubuntu_24.04.sif apt install -y neofetch&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-y&amp;lt;/code&amp;gt; flag tells &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; to answer &amp;quot;yes&amp;quot; to all prompts automatically.&lt;br /&gt;
&lt;br /&gt;
Once this completes, neofetch is installed — but only in the overlay. The original &amp;lt;code&amp;gt;ubuntu_24.04.sif&amp;lt;/code&amp;gt; is still untouched.&lt;br /&gt;
&lt;br /&gt;
== Building a New Image from the Original + Overlay ==&lt;br /&gt;
&lt;br /&gt;
Right now your changes only exist in that temporary overlay directory. If you were to delete it or reboot, those changes would be gone. To make your modifications permanent, you can build a new SIF image that bakes in the overlay changes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer build --fakeroot ubuntu_neofetch.sif --overlay $ov ubuntu_24.04.sif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This takes the original &amp;lt;code&amp;gt;ubuntu_24.04.sif&amp;lt;/code&amp;gt;, applies everything in the overlay on top of it, and produces a brand new file: &amp;lt;code&amp;gt;ubuntu_neofetch.sif&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Testing the New Image ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s verify that neofetch is available in our new image:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer exec ubuntu_neofetch.sif neofetch&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see the familiar Ubuntu logo and system information output. Neofetch is now permanently part of this new image — no overlay or fakeroot needed to run it.&lt;br /&gt;
&lt;br /&gt;
== Cleaning Up ==&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to remove the temporary overlay directory when you&#039;re done:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
rm -rf $ov&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Step !! Command&lt;br /&gt;
|-&lt;br /&gt;
| Pull base image || &amp;lt;code&amp;gt;apptainer pull ./ubuntu_24.04.sif docker://ubuntu:24.04&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Create overlay directory || &amp;lt;code&amp;gt;ov=$(mktemp -d)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Update packages (with overlay + fakeroot) || &amp;lt;code&amp;gt;apptainer exec --fakeroot --overlay $ov ubuntu_24.04.sif apt update&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Install software || &amp;lt;code&amp;gt;apptainer exec --fakeroot --overlay $ov ubuntu_24.04.sif apt install -y neofetch&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Build new image from original + overlay || &amp;lt;code&amp;gt;apptainer build --fakeroot ubuntu_neofetch.sif --overlay $ov ubuntu_24.04.sif&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Test the new image || &amp;lt;code&amp;gt;apptainer exec ubuntu_neofetch.sif neofetch&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Clean up overlay || &amp;lt;code&amp;gt;rm -rf $ov&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-FakerootAndOverlays&amp;diff=2681</id>
		<title>Tutorials/Apptainer-FakerootAndOverlays</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-FakerootAndOverlays&amp;diff=2681"/>
		<updated>2026-03-12T09:59:42Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: Created page with &amp;quot;= Apptainer Overlays: Modifying Container Images =  &amp;#039;&amp;#039;&amp;#039;Important:&amp;#039;&amp;#039;&amp;#039; Before you begin, make sure the following are in place:  * You are running on a &amp;#039;&amp;#039;&amp;#039;compute node&amp;#039;&amp;#039;&amp;#039;, not a login node. Request an interactive session first (e.g. via &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; or your scheduler). * Your &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; image files should be stored on &amp;#039;&amp;#039;&amp;#039;Lustre&amp;#039;&amp;#039;&amp;#039; (e.g. in your scratch space), not in your home directory. SIF files can be large and will eat through your home quota fast. * Set you...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Apptainer Overlays: Modifying Container Images =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; Before you begin, make sure the following are in place:&lt;br /&gt;
&lt;br /&gt;
* You are running on a &#039;&#039;&#039;compute node&#039;&#039;&#039;, not a login node. Request an interactive session first (e.g. via &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; or your scheduler).&lt;br /&gt;
* Your &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; image files should be stored on &#039;&#039;&#039;Lustre&#039;&#039;&#039; (e.g. in your scratch space), not in your home directory. SIF files can be large and will eat through your home quota fast.&lt;br /&gt;
* Set your Apptainer cache to Lustre as well. Add this to your session (or your &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export APPTAINER_CACHEDIR=$myScratch/apptainer_cache&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
Load the required modules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module reset&lt;br /&gt;
module load utilities Apptainer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pulling the Base Image ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s pull an Ubuntu 24.04 image from Docker Hub:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer pull ./ubuntu_24.04.sif docker://ubuntu:24.04&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will download and convert the image into a SIF file in your current directory.&lt;br /&gt;
&lt;br /&gt;
== The Problem: SIF Images Are Read-Only ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s try to update the package list inside the container:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer exec ubuntu_24.04.sif apt update&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will fail. You will see errors about not being able to write to package lists and lock files. This is because SIF files are &#039;&#039;&#039;read-only&#039;&#039;&#039; by design — you cannot modify them directly.&lt;br /&gt;
&lt;br /&gt;
So how do we install software into a container? This is where &#039;&#039;&#039;overlays&#039;&#039;&#039; and &#039;&#039;&#039;fakeroot&#039;&#039;&#039; come in.&lt;br /&gt;
&lt;br /&gt;
== What is &amp;lt;code&amp;gt;--fakeroot&amp;lt;/code&amp;gt;? ==&lt;br /&gt;
&lt;br /&gt;
On an HPC system you do not have root (administrator) privileges. But many operations inside a container — like installing packages with &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; — expect to be run as root.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--fakeroot&amp;lt;/code&amp;gt; flag (or &amp;lt;code&amp;gt;-f&amp;lt;/code&amp;gt;) tells Apptainer to make it &#039;&#039;look like&#039;&#039; you are running as root inside the container, even though you are not actually root on the host system. This is enough to trick package managers like &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; into working.&lt;br /&gt;
&lt;br /&gt;
== What is an Overlay? ==&lt;br /&gt;
&lt;br /&gt;
An overlay is a writable layer that sits on top of a read-only SIF image. Think of it like putting a sheet of tracing paper over a printed page — you can write on the tracing paper without changing the original page underneath.&lt;br /&gt;
&lt;br /&gt;
Any changes you make (installed packages, new files, config changes) are stored in the overlay, leaving the original SIF image untouched.&lt;br /&gt;
&lt;br /&gt;
== Creating and Using an Overlay ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s create a temporary directory to use as our overlay:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ov=$(mktemp -d)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This creates a temporary directory somewhere under &amp;lt;code&amp;gt;/tmp&amp;lt;/code&amp;gt; and stores the path in the variable &amp;lt;code&amp;gt;$ov&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s try that &amp;lt;code&amp;gt;apt update&amp;lt;/code&amp;gt; again, this time with &amp;lt;code&amp;gt;--fakeroot&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--overlay&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer exec --fakeroot --overlay $ov ubuntu_24.04.sif apt update&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This time it should work. Apptainer is running you as fake root, and any writes are going into the overlay directory instead of trying to modify the read-only SIF.&lt;br /&gt;
&lt;br /&gt;
== Installing Software via the Overlay ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s install &amp;lt;code&amp;gt;neofetch&amp;lt;/code&amp;gt; (a tool that displays system information) into the container through the overlay:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer exec --fakeroot --overlay $ov ubuntu_24.04.sif apt install -y neofetch&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-y&amp;lt;/code&amp;gt; flag tells &amp;lt;code&amp;gt;apt&amp;lt;/code&amp;gt; to answer &amp;quot;yes&amp;quot; to all prompts automatically.&lt;br /&gt;
&lt;br /&gt;
Once this completes, neofetch is installed — but only in the overlay. The original &amp;lt;code&amp;gt;ubuntu_24.04.sif&amp;lt;/code&amp;gt; is still untouched.&lt;br /&gt;
&lt;br /&gt;
== Building a New Image from the Original + Overlay ==&lt;br /&gt;
&lt;br /&gt;
Right now your changes only exist in that temporary overlay directory. If you were to delete it or reboot, those changes would be gone. To make your modifications permanent, you can build a new SIF image that bakes in the overlay changes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer build --fakeroot ubuntu_neofetch.sif --overlay $ov ubuntu_24.04.sif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This takes the original &amp;lt;code&amp;gt;ubuntu_24.04.sif&amp;lt;/code&amp;gt;, applies everything in the overlay on top of it, and produces a brand new file: &amp;lt;code&amp;gt;ubuntu_neofetch.sif&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Testing the New Image ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s verify that neofetch is available in our new image:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer exec ubuntu_neofetch.sif neofetch&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see the familiar Ubuntu logo and system information output. Neofetch is now permanently part of this new image — no overlay or fakeroot needed to run it.&lt;br /&gt;
&lt;br /&gt;
== Cleaning Up ==&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to remove the temporary overlay directory when you&#039;re done:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
rm -rf $ov&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Step !! Command&lt;br /&gt;
|-&lt;br /&gt;
| Pull base image || &amp;lt;code&amp;gt;apptainer pull ./ubuntu_24.04.sif docker://ubuntu:24.04&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Create overlay directory || &amp;lt;code&amp;gt;ov=$(mktemp -d)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Update packages (with overlay + fakeroot) || &amp;lt;code&amp;gt;apptainer exec --fakeroot --overlay $ov ubuntu_24.04.sif apt update&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Install software || &amp;lt;code&amp;gt;apptainer exec --fakeroot --overlay $ov ubuntu_24.04.sif apt install -y neofetch&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Build new image from original + overlay || &amp;lt;code&amp;gt;apptainer build --fakeroot ubuntu_neofetch.sif --overlay $ov ubuntu_24.04.sif&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Test the new image || &amp;lt;code&amp;gt;apptainer exec ubuntu_neofetch.sif neofetch&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Clean up overlay || &amp;lt;code&amp;gt;rm -rf $ov&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials&amp;diff=2680</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials&amp;diff=2680"/>
		<updated>2026-03-12T09:58:49Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Tutorials ==&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
[[Create Your Own Modules]]&lt;br /&gt;
&lt;br /&gt;
=== Apptainer ===&lt;br /&gt;
&lt;br /&gt;
* [[Tutorials/Apptainer-PullingImages|Pulling Images]]&lt;br /&gt;
* Fakeroot and overlays&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials&amp;diff=2679</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials&amp;diff=2679"/>
		<updated>2026-03-12T09:14:20Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: /* Apptainer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Tutorials ==&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
[[Create Your Own Modules]]&lt;br /&gt;
&lt;br /&gt;
=== Apptainer ===&lt;br /&gt;
&lt;br /&gt;
* [[Tutorials/Apptainer-PullingImages|Pulling Images]]&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials&amp;diff=2678</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials&amp;diff=2678"/>
		<updated>2026-03-12T09:13:07Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: /* Apptainer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Tutorials ==&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
[[Create Your Own Modules]]&lt;br /&gt;
&lt;br /&gt;
=== Apptainer ===&lt;br /&gt;
&lt;br /&gt;
* [[Apptainer-PullingImages|Pulling Images]]&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-PullingImages&amp;diff=2677</id>
		<title>Tutorials/Apptainer-PullingImages</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-PullingImages&amp;diff=2677"/>
		<updated>2026-03-12T09:11:44Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Pulling Apptainer Images =&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
First, grab an interactive session in a  compute node.&lt;br /&gt;
&lt;br /&gt;
Then make sure your module environment is clean and Apptainer is loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module reset&lt;br /&gt;
module load utilities Apptainer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Also, please make sure to store image and in your lustre folders. &lt;br /&gt;
&lt;br /&gt;
== Your First Pull ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s start by pulling a simple &amp;quot;hello world&amp;quot; container image:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer pull ./hello-world.sif shub://vsoch/hello-world&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That is a lot happening in one line, so let&#039;s break it down piece by piece:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Part !! What it means&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apptainer pull&amp;lt;/code&amp;gt; || The Apptainer command to download a container image.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;./hello-world.sif&amp;lt;/code&amp;gt; || The output filename. This is where Apptainer will save the downloaded image. The &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; extension stands for &#039;&#039;&#039;Singularity Image Format&#039;&#039;&#039; — Apptainer&#039;s own container format. The &amp;lt;code&amp;gt;./&amp;lt;/code&amp;gt; means &amp;quot;save it in my current directory&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;shub://vsoch/hello-world&amp;lt;/code&amp;gt; || The source to pull from. &amp;lt;code&amp;gt;shub://&amp;lt;/code&amp;gt; tells Apptainer to look at [https://singularity-hub.org Singularity Hub], a public registry for container images. &amp;lt;code&amp;gt;vsoch/hello-world&amp;lt;/code&amp;gt; is the user and image name, much like a path on GitHub.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Once the command finishes, you will have a file called &amp;lt;code&amp;gt;hello-world.sif&amp;lt;/code&amp;gt; in your current directory. You can verify this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ls -lh hello-world.sif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; file is your container — a single, portable file that contains an entire operating system and software environment. You can copy it, move it, or share it just like any other file.&lt;br /&gt;
&lt;br /&gt;
== Running the Container ==&lt;br /&gt;
&lt;br /&gt;
The simplest way to use a container is with &amp;lt;code&amp;gt;apptainer run&amp;lt;/code&amp;gt;. This executes whatever default action the container was built to perform:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer run ./hello-world.sif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see a friendly output from the container. That is it — you just ran software inside a container.&lt;br /&gt;
&lt;br /&gt;
== Opening a Shell Inside the Container ==&lt;br /&gt;
&lt;br /&gt;
Instead of running the container&#039;s default action, you can open an interactive shell inside it. This lets you look around and explore the container&#039;s environment as if you had logged into a different machine.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer shell ./hello-world.sif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will notice your prompt changes (usually to &amp;lt;code&amp;gt;Apptainer&amp;gt;&amp;lt;/code&amp;gt;), indicating that you are now &amp;quot;inside&amp;quot; the container. Type &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; when you want to leave.&lt;br /&gt;
&lt;br /&gt;
=== The Container is Not Fully Isolated (by Default) ===&lt;br /&gt;
&lt;br /&gt;
Here is something important that surprises many beginners: by default, Apptainer does &#039;&#039;&#039;not&#039;&#039;&#039; fully isolate the container from the host system. Your home directory and parts of the host filesystem are still visible inside the container.&lt;br /&gt;
&lt;br /&gt;
Try this while inside the shell:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer shell ./hello-world.sif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, from inside the container:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Apptainer&amp;gt; mkdir ~/test-from-container&lt;br /&gt;
Apptainer&amp;gt; ls ~/test-from-container&lt;br /&gt;
Apptainer&amp;gt; exit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, back on the host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ls ~/test-from-container&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The directory is there — on your &#039;&#039;&#039;real&#039;&#039;&#039; filesystem. The container was able to create it because your home directory was mounted inside the container by default. This is by design: it makes it easy to work with your own files, but it means the container is not completely separate from the host.&lt;br /&gt;
&lt;br /&gt;
=== Full Isolation with &amp;lt;code&amp;gt;--containall&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
If you want the container to be fully isolated from the host system — no access to your home directory, no shared environment variables, no host filesystems — use the &amp;lt;code&amp;gt;--containall&amp;lt;/code&amp;gt; flag (or its short form &amp;lt;code&amp;gt;-C&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer shell --containall ./hello-world.sif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try the same thing from inside:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Apptainer&amp;gt; mkdir ~/test-isolated&lt;br /&gt;
Apptainer&amp;gt; exit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Back on the host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ls ~/test-isolated&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This time, the directory does &#039;&#039;&#039;not&#039;&#039;&#039; exist on your host. The container was completely isolated — anything it created lived only inside the container&#039;s temporary environment and was discarded when you exited.&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;--containall&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;-C&amp;lt;/code&amp;gt;) when you want a clean, reproducible environment that does not interfere with (or depend on) the host system.&lt;br /&gt;
&lt;br /&gt;
== Running a Specific Command with &amp;lt;code&amp;gt;exec&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Sometimes you do not want a full interactive shell — you just want to run a single command inside the container and get the output. That is what &amp;lt;code&amp;gt;apptainer exec&amp;lt;/code&amp;gt; is for.&lt;br /&gt;
&lt;br /&gt;
For example, let&#039;s check which operating system is inside this container:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer exec ./hello-world.sif cat /etc/lsb-release&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see output similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
DISTRIB_ID=Ubuntu&lt;br /&gt;
DISTRIB_RELEASE=14.04&lt;br /&gt;
DISTRIB_CODENAME=trusty&lt;br /&gt;
DISTRIB_DESCRIPTION=&amp;quot;Ubuntu 14.04.6 LTS&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The container is running &#039;&#039;&#039;Ubuntu 14.04&#039;&#039;&#039; — regardless of what operating system your host machine is running. This is the power of containers: you can run software built for a completely different OS environment without any conflicts.&lt;br /&gt;
&lt;br /&gt;
The pattern for &amp;lt;code&amp;gt;exec&amp;lt;/code&amp;gt; is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;apptainer exec &#039;&#039;[options]&#039;&#039; &#039;&#039;container.sif&#039;&#039; &#039;&#039;command&#039;&#039; &#039;&#039;[arguments]&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
You now know the three main ways to interact with a pulled Apptainer container:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! What it does&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apptainer run container.sif&amp;lt;/code&amp;gt; || Runs the container&#039;s default action&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apptainer shell container.sif&amp;lt;/code&amp;gt; || Opens an interactive shell inside the container&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apptainer exec container.sif &#039;&#039;command&#039;&#039;&amp;lt;/code&amp;gt; || Runs a single specific command inside the container&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And one important flag to remember:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Flag !! What it does&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--containall&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;-C&amp;lt;/code&amp;gt;) || Fully isolates the container from the host (no shared home directory, no host environment)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-PullingImages&amp;diff=2676</id>
		<title>Tutorials/Apptainer-PullingImages</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials/Apptainer-PullingImages&amp;diff=2676"/>
		<updated>2026-03-12T09:09:41Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: Add message about storing image in lustre&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Pulling Apptainer Images =&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
First, make sure your module environment is clean and Apptainer is loaded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module reset&lt;br /&gt;
module load utilities Apptainer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Also, please make sure to store image and in your lustre folders. &lt;br /&gt;
&lt;br /&gt;
== Your First Pull ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s start by pulling a simple &amp;quot;hello world&amp;quot; container image:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer pull ./hello-world.sif shub://vsoch/hello-world&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That is a lot happening in one line, so let&#039;s break it down piece by piece:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Part !! What it means&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apptainer pull&amp;lt;/code&amp;gt; || The Apptainer command to download a container image.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;./hello-world.sif&amp;lt;/code&amp;gt; || The output filename. This is where Apptainer will save the downloaded image. The &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; extension stands for &#039;&#039;&#039;Singularity Image Format&#039;&#039;&#039; — Apptainer&#039;s own container format. The &amp;lt;code&amp;gt;./&amp;lt;/code&amp;gt; means &amp;quot;save it in my current directory&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;shub://vsoch/hello-world&amp;lt;/code&amp;gt; || The source to pull from. &amp;lt;code&amp;gt;shub://&amp;lt;/code&amp;gt; tells Apptainer to look at [https://singularity-hub.org Singularity Hub], a public registry for container images. &amp;lt;code&amp;gt;vsoch/hello-world&amp;lt;/code&amp;gt; is the user and image name, much like a path on GitHub.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Once the command finishes, you will have a file called &amp;lt;code&amp;gt;hello-world.sif&amp;lt;/code&amp;gt; in your current directory. You can verify this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ls -lh hello-world.sif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This &amp;lt;code&amp;gt;.sif&amp;lt;/code&amp;gt; file is your container — a single, portable file that contains an entire operating system and software environment. You can copy it, move it, or share it just like any other file.&lt;br /&gt;
&lt;br /&gt;
== Running the Container ==&lt;br /&gt;
&lt;br /&gt;
The simplest way to use a container is with &amp;lt;code&amp;gt;apptainer run&amp;lt;/code&amp;gt;. This executes whatever default action the container was built to perform:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer run ./hello-world.sif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see a friendly output from the container. That is it — you just ran software inside a container.&lt;br /&gt;
&lt;br /&gt;
== Opening a Shell Inside the Container ==&lt;br /&gt;
&lt;br /&gt;
Instead of running the container&#039;s default action, you can open an interactive shell inside it. This lets you look around and explore the container&#039;s environment as if you had logged into a different machine.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer shell ./hello-world.sif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will notice your prompt changes (usually to &amp;lt;code&amp;gt;Apptainer&amp;gt;&amp;lt;/code&amp;gt;), indicating that you are now &amp;quot;inside&amp;quot; the container. Type &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; when you want to leave.&lt;br /&gt;
&lt;br /&gt;
=== The Container is Not Fully Isolated (by Default) ===&lt;br /&gt;
&lt;br /&gt;
Here is something important that surprises many beginners: by default, Apptainer does &#039;&#039;&#039;not&#039;&#039;&#039; fully isolate the container from the host system. Your home directory and parts of the host filesystem are still visible inside the container.&lt;br /&gt;
&lt;br /&gt;
Try this while inside the shell:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer shell ./hello-world.sif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, from inside the container:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Apptainer&amp;gt; mkdir ~/test-from-container&lt;br /&gt;
Apptainer&amp;gt; ls ~/test-from-container&lt;br /&gt;
Apptainer&amp;gt; exit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, back on the host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ls ~/test-from-container&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The directory is there — on your &#039;&#039;&#039;real&#039;&#039;&#039; filesystem. The container was able to create it because your home directory was mounted inside the container by default. This is by design: it makes it easy to work with your own files, but it means the container is not completely separate from the host.&lt;br /&gt;
&lt;br /&gt;
=== Full Isolation with &amp;lt;code&amp;gt;--containall&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
If you want the container to be fully isolated from the host system — no access to your home directory, no shared environment variables, no host filesystems — use the &amp;lt;code&amp;gt;--containall&amp;lt;/code&amp;gt; flag (or its short form &amp;lt;code&amp;gt;-C&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer shell --containall ./hello-world.sif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try the same thing from inside:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Apptainer&amp;gt; mkdir ~/test-isolated&lt;br /&gt;
Apptainer&amp;gt; exit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Back on the host:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ls ~/test-isolated&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This time, the directory does &#039;&#039;&#039;not&#039;&#039;&#039; exist on your host. The container was completely isolated — anything it created lived only inside the container&#039;s temporary environment and was discarded when you exited.&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;--containall&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;-C&amp;lt;/code&amp;gt;) when you want a clean, reproducible environment that does not interfere with (or depend on) the host system.&lt;br /&gt;
&lt;br /&gt;
== Running a Specific Command with &amp;lt;code&amp;gt;exec&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Sometimes you do not want a full interactive shell — you just want to run a single command inside the container and get the output. That is what &amp;lt;code&amp;gt;apptainer exec&amp;lt;/code&amp;gt; is for.&lt;br /&gt;
&lt;br /&gt;
For example, let&#039;s check which operating system is inside this container:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
apptainer exec ./hello-world.sif cat /etc/lsb-release&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see output similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
DISTRIB_ID=Ubuntu&lt;br /&gt;
DISTRIB_RELEASE=14.04&lt;br /&gt;
DISTRIB_CODENAME=trusty&lt;br /&gt;
DISTRIB_DESCRIPTION=&amp;quot;Ubuntu 14.04.6 LTS&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The container is running &#039;&#039;&#039;Ubuntu 14.04&#039;&#039;&#039; — regardless of what operating system your host machine is running. This is the power of containers: you can run software built for a completely different OS environment without any conflicts.&lt;br /&gt;
&lt;br /&gt;
The pattern for &amp;lt;code&amp;gt;exec&amp;lt;/code&amp;gt; is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;apptainer exec &#039;&#039;[options]&#039;&#039; &#039;&#039;container.sif&#039;&#039; &#039;&#039;command&#039;&#039; &#039;&#039;[arguments]&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
You now know the three main ways to interact with a pulled Apptainer container:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! What it does&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apptainer run container.sif&amp;lt;/code&amp;gt; || Runs the container&#039;s default action&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apptainer shell container.sif&amp;lt;/code&amp;gt; || Opens an interactive shell inside the container&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apptainer exec container.sif &#039;&#039;command&#039;&#039;&amp;lt;/code&amp;gt; || Runs a single specific command inside the container&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And one important flag to remember:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Flag !! What it does&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--containall&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;-C&amp;lt;/code&amp;gt;) || Fully isolates the container from the host (no shared home directory, no host environment)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Main_Page/Tutorials/Apptainer&amp;diff=2675</id>
		<title>Main Page/Tutorials/Apptainer</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Main_Page/Tutorials/Apptainer&amp;diff=2675"/>
		<updated>2026-03-11T13:55:51Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: Created page with &amp;quot;This page contains a list of tutorials related to the usage of apptainer in Anunna.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page contains a list of tutorials related to the usage of apptainer in Anunna.&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Main_Page/Tutorials&amp;diff=2674</id>
		<title>Main Page/Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Main_Page/Tutorials&amp;diff=2674"/>
		<updated>2026-03-11T13:55:02Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: Created page with &amp;quot; =Tutorials=   This page contains an index of various tutorials specific to the Anunna supercomputer.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Tutorials= &lt;br /&gt;
&lt;br /&gt;
This page contains an index of various tutorials specific to the Anunna supercomputer.&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Apptainer&amp;diff=2673</id>
		<title>Apptainer</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Apptainer&amp;diff=2673"/>
		<updated>2026-03-11T13:46:58Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Apptainer is a container platform. It allows you to create and run containers that package up pieces of software in a way that is portable and reproducible. You can build a container using Apptainer on your laptop, and then run it on many of the largest HPC clusters in the world, local university or company clusters, a single server, in the cloud, or on a workstation down the hall. Your container is a single file, and you don’t have to worry about how to install all the software you need on each different operating system.&lt;br /&gt;
&lt;br /&gt;
Apptainer is a fork of singularity and, thus, also supports singularity commands and workflows.&lt;br /&gt;
&lt;br /&gt;
==Apptainer on Anunna==&lt;br /&gt;
&lt;br /&gt;
Since Apptainer is not dependent on specific compilers and toolchains, it is now place inside the &#039;&#039;&#039;utilities&#039;&#039;&#039; bucket.  Inside this bucket, there are two options:&lt;br /&gt;
&lt;br /&gt;
* Apptainer&lt;br /&gt;
* Apptainer-compat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The regular &#039;&#039;&#039;Apptainer&#039;&#039;&#039; module loads the version compiled in Anunna. This is more suitable to containers built with more recent operating systems. For most projects this will be enough. &lt;br /&gt;
&lt;br /&gt;
However, some projects still use some very old Linux versions and through errors related to missing versions of GLIBC when running in Anunna. That is where &#039;&#039;&#039;Apptainer-compat&#039;&#039;&#039; comes in, this is a package distributed by the Fedora Project EPEL (Extra Packages for Enterprise Linux) repositories. This package is built with a broad range of versions of GLIBC in mind, so will likely work with older images like ubuntu 22.04 or older. &lt;br /&gt;
&lt;br /&gt;
One can load apptainer by running the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module load utilities&lt;br /&gt;
module load Apptainer&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Initial Setup ====&lt;br /&gt;
Apptainer will cache SIF container images generated from remote sources, and any OCI/docker layers used to create them. The cache is created at &amp;lt;code&amp;gt;$HOME/.apptainer/cache&amp;lt;/code&amp;gt; by default. The location of the cache can be changed by setting the &amp;lt;code&amp;gt;APPTAINER_CACHEDIR&amp;lt;/code&amp;gt; environment variable.&lt;br /&gt;
&lt;br /&gt;
Since there is a limited amount of space available at &amp;lt;code&amp;gt;$HOME&amp;lt;/code&amp;gt;, the Apptainer cache can quickly fill your quota. So it is recommended that you set the variable &amp;lt;code&amp;gt;APPTAINER_CACHEDIR&amp;lt;/code&amp;gt; to a location ion lustre by edition your &amp;lt;code&amp;gt;$HOME/.bash_aliases&amp;lt;/code&amp;gt; file. An example is provided at [[Aliases and local variables]]&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Jupyter&amp;diff=2642</id>
		<title>Jupyter</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Jupyter&amp;diff=2642"/>
		<updated>2026-02-25T18:10:23Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: New jupyter page in OOD&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;JupyterLab is the latest web-based interactive development environment for notebooks, code, and data. Its flexible interface allows users to configure and arrange workflows in data science, scientific computing, computational journalism, and machine learning. A modular design invites extensions to expand and enrich functionality.&lt;br /&gt;
&lt;br /&gt;
Traditionally, jupyter has been offered at Anunna via [https://notebook.anunna.wur.nl notebook.anunna.wur.nl], though OOD makes it possible to deploy Jupyter based off the environment modules from Anunna. Adding greater stability and flexibility. Jupyter is listed in the featured apps speed-dial and upon clicking on it, the user is presented with a form where they can select their preferences and allocate resources for their session&lt;br /&gt;
[[File:Jupyter-form-20260225.png|thumb|695x695px|Resource Allocation form for Jupyter Session]]&lt;br /&gt;
&lt;br /&gt;
=== Resource Allocation Form ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Python version:&#039;&#039;&#039; version of python the default kernel will be running&lt;br /&gt;
* &#039;&#039;&#039;Session Type:&#039;&#039;&#039; traditional notebooks interface or the newer lab interface. It is also possible to change the interface from within the active Jupyter session.&lt;br /&gt;
* &#039;&#039;&#039;Hours:&#039;&#039;&#039; Number of hours allocated to the session, max 4 hours&lt;br /&gt;
* &#039;&#039;&#039;Number of CPUs:&#039;&#039;&#039; Number of CPU cores allocated for the session &lt;br /&gt;
* &#039;&#039;&#039;Amount of Memory:&#039;&#039;&#039; RAM allocated for the session&lt;br /&gt;
* &#039;&#039;&#039;Number of GPUs:&#039;&#039;&#039; 0 denotes no GPU is used, a non-zero number will switch the partition from main to the gpu partition&lt;br /&gt;
* &#039;&#039;&#039;Comment:&#039;&#039;&#039;  label or project number that will show up in billing.&lt;br /&gt;
* &#039;&#039;&#039;Slurm Options:&#039;&#039;&#039; slurm flags that may override settings above&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Connecting to an active session ====&lt;br /&gt;
After the resources and preferences have been defined, the user can simply click on the launch button. Which will submit a job at Anunna and take them to the My Interactive Sessions page where they can connect to their session. &lt;br /&gt;
&lt;br /&gt;
Once the session is ready a &amp;quot;Connect to Jupyter &amp;quot; button will appear which will allow the user to (re)connect to the corresponding active session.&lt;br /&gt;
&lt;br /&gt;
The card also has a red &amp;quot;Cancel&amp;quot; button where the user may terminate their session.&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=File:Jupyter-form-20260225.png&amp;diff=2641</id>
		<title>File:Jupyter-form-20260225.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=File:Jupyter-form-20260225.png&amp;diff=2641"/>
		<updated>2026-02-25T18:01:19Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;OOD jupyter form&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Anunna_Shell_Access&amp;diff=2640</id>
		<title>Anunna Shell Access</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Anunna_Shell_Access&amp;diff=2640"/>
		<updated>2026-02-25T14:25:35Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Anunna Shell Access is a web based bash shell terminal emulator available at the Anunna apps portal. &lt;br /&gt;
&lt;br /&gt;
This application provides quick access to a bash session in one of the login nodes. &lt;br /&gt;
&lt;br /&gt;
User&#039;s are able to select a theme for their terminal session on the top right corner of the screen. &lt;br /&gt;
&lt;br /&gt;
When a session times out, just refresh your browser tab and it should reconnect. &lt;br /&gt;
&lt;br /&gt;
Since this runs in a browser, users should mind that some bash keyboard shortcuts may not work properly, e.g. ctrl + w&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Anunna_Shell_Access&amp;diff=2639</id>
		<title>Anunna Shell Access</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Anunna_Shell_Access&amp;diff=2639"/>
		<updated>2026-02-25T14:23:56Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: Created page with &amp;quot;Anunna Shell Access is a web based bash shell terminal emulator available at the Anunna apps portal.   This application provides quick access to a bash session in one of the login nodes.   User&amp;#039;s are able to select a theme for their terminal session on the top right corner of the screen.   When a session times out, just refresh your browser tab and it should reconnect.   Since this runs in a browser, users should mind that some keyboard shortcuts may not work properly, e...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Anunna Shell Access is a web based bash shell terminal emulator available at the Anunna apps portal. &lt;br /&gt;
&lt;br /&gt;
This application provides quick access to a bash session in one of the login nodes. &lt;br /&gt;
&lt;br /&gt;
User&#039;s are able to select a theme for their terminal session on the top right corner of the screen. &lt;br /&gt;
&lt;br /&gt;
When a session times out, just refresh your browser tab and it should reconnect. &lt;br /&gt;
&lt;br /&gt;
Since this runs in a browser, users should mind that some keyboard shortcuts may not work properly, e.g. ctrl + w&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Main_Page&amp;diff=2638</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Main_Page&amp;diff=2638"/>
		<updated>2026-02-25T14:16:18Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Anunna is a [http://en.wikipedia.org/wiki/High-performance_computing High Performance Computer] (HPC) infrastructure hosted by [https://www.wur.nl/en/show/supercomputer-anunna-opens-up-more-opportunities-for-data-storage-and-artificial-intelligence-applications.htm Wageningen University &amp;amp; Research Centre]. It is open for use for all WUR research groups as well as other organizations, including companies, that have collaborative projects with WUR. &lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
&lt;br /&gt;
* [[History of the Cluster|Historical information on the startup of Anunna]]&lt;br /&gt;
&lt;br /&gt;
== Access Policy ==&lt;br /&gt;
[[Access_Policy | Main Article: Access Policy]]&lt;br /&gt;
&lt;br /&gt;
Access needs to be granted actively (by creation of an account on the cluster by FB-IT). Use of resources is limited by the scheduler. Note that the use of Anunna is not free of charge. &lt;br /&gt;
&lt;br /&gt;
= Our Courses =&lt;br /&gt;
The Anunna team organizes HPC courses three times a year to strengthen basic &amp;amp; more advanced skills and enable users to make the most effective use of our facility.&lt;br /&gt;
&lt;br /&gt;
== [[Linux Basic]] ==&lt;br /&gt;
&lt;br /&gt;
== [[HPC Basic]] ==&lt;br /&gt;
&lt;br /&gt;
== [[HPC Advanced]] ==&lt;br /&gt;
&lt;br /&gt;
== [[2026 Course dates]] ==&lt;br /&gt;
&lt;br /&gt;
= Using Anunna =&lt;br /&gt;
* [[Tariffs | Costs associated with resource usage]]&lt;br /&gt;
&lt;br /&gt;
== Gaining access to Anunna==&lt;br /&gt;
Access to the cluster and file transfer are traditionally done via [http://en.wikipedia.org/wiki/Secure_Shell SSH and SFTP].&lt;br /&gt;
* [[log_in_to_B4F_cluster | Logging into cluster using ssh]]&lt;br /&gt;
* [[file_transfer | File transfer options]]&lt;br /&gt;
* [[Services | Alternative access methods, and extra features and services on Anunna]]&lt;br /&gt;
* [[Filesystems | Data storage methods on Anunna]]&lt;br /&gt;
&lt;br /&gt;
== Using Anunna for courses (mainly jupyter notebooks) ==&lt;br /&gt;
* [[steps_for_courses | Steps involved to run a course on Anunna]]&lt;br /&gt;
 &lt;br /&gt;
= Events =&lt;br /&gt;
&lt;br /&gt;
* [[Courses]] that have happened and are happening&lt;br /&gt;
* [[Downtime]] that will affect all users&lt;br /&gt;
* [[Meetings]] that may affect the policies of Anunna&lt;br /&gt;
&lt;br /&gt;
= Software =&lt;br /&gt;
* [[Modules]]&lt;br /&gt;
* [[Apptainer]]&lt;br /&gt;
* [[Python]]&lt;br /&gt;
* [[R]] &lt;br /&gt;
* [[Julia]]&lt;br /&gt;
&lt;br /&gt;
== Browser apps ==&lt;br /&gt;
This page provides an overview of the GUI-based applications available Anunna, including background information and practical guidance on how to access and use interactive desktops and graphical tools directly from your web browser.&lt;br /&gt;
&lt;br /&gt;
* [[General overview|General Overview]]&lt;br /&gt;
* [[Anunna Shell Access]]&lt;br /&gt;
* [[Using the File browser|File Browser]]&lt;br /&gt;
* [[Jupyter|Featured Apps]]&lt;br /&gt;
* [[Jupyter]]&lt;br /&gt;
* [[RStudio|R Studio]]&lt;br /&gt;
* [[Linux desktop|Linux Desktop]]&lt;br /&gt;
* [[Requesting new software|Requesting New Software]]&lt;br /&gt;
&lt;br /&gt;
== Command-line Software ==&lt;br /&gt;
&lt;br /&gt;
==== Cluster Scheduler ====&lt;br /&gt;
Anunna uses Slurm as job scheduler.&lt;br /&gt;
* [[Using_Slurm | Submit jobs with Slurm]]&lt;br /&gt;
* [[node_usage_graph | Be aware of how much work the cluster is under right now with &#039;node_usage_graph&#039;]]&lt;br /&gt;
* [[SLURM_Compare | Rosetta Stone of Workload Managers]]&lt;br /&gt;
&lt;br /&gt;
==== [[Globally installed software]] ====&lt;br /&gt;
&lt;br /&gt;
==== [[ABGC_modules |ABGC specific modules]] ====&lt;br /&gt;
&lt;br /&gt;
==== Installation of software by users ====&lt;br /&gt;
* [[Domain_specific_software_on_B4Fcluster_installation_by_users | Installing domain specific software: installation by users]]&lt;br /&gt;
* [[Setting local variables]]&lt;br /&gt;
* [[Installing_R_packages_locally | Installing R packages locally]]&lt;br /&gt;
* [[Setting_up_Python_virtualenv | Setting up and using a virtual environment for Python3 ]]&lt;br /&gt;
* [[Virtual_environment_Python_3.4_or_higher | Setting up and using a virtual environment for Python3.4 or higher ]]&lt;br /&gt;
* [[Installing WRF and WPS]]&lt;br /&gt;
* [[Running scripts on a fixed timeschedule (cron)]]&lt;br /&gt;
&lt;br /&gt;
= Useful Notes = &lt;br /&gt;
&lt;br /&gt;
== Being in control of Environment parameters ==&lt;br /&gt;
&lt;br /&gt;
* [[Using_environment_modules | Using environment modules]]&lt;br /&gt;
* [[Aliases and local variables]]&lt;br /&gt;
* [[Setting local variables]]&lt;br /&gt;
* [[Setting_TMPDIR | Set a custom temporary directory location]]&lt;br /&gt;
* [[Installing_R_packages_locally | Installing R packages locally]]&lt;br /&gt;
* [[Setting_up_Python_virtualenv | Setting up and using a virtual environment for Python3 ]]&lt;br /&gt;
* [[Locale_settings]] (how numbers and dates are displayed)&lt;br /&gt;
&lt;br /&gt;
== Controlling costs ==&lt;br /&gt;
&lt;br /&gt;
* [[SACCT | using SACCT to see your costs]]&lt;br /&gt;
* [[get_my_bill | using the &amp;quot;get_my_bill&amp;quot; script to estimate costs]]&lt;br /&gt;
&lt;br /&gt;
== Management ==&lt;br /&gt;
Product Owner of Anunna is Alexander van Ittersum (Wageningen UR,FB-IT, C&amp;amp;PS). [[User: prins089 | Fons Prinsen (Wageningen UR, FB-IT, C&amp;amp;PS)]] is responsible for [[Maintenance_and_Management | Maintenance and Management]] of the cluster.&lt;br /&gt;
&lt;br /&gt;
* [[Roadmap | Ambitions regarding innovation, support and administration of Anunna ]]&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
* [[Bioinformatics_tips_tricks_workflows |Bioinformatics tips, tricks, and workflows]]&lt;br /&gt;
* [[Parallel_R_code_on_SLURM | Running parallel R code on SLURM]]&lt;br /&gt;
* [[Convert_between_MediaWiki_and_other_formats | Convert between MediaWiki format and other formats]]&lt;br /&gt;
* [[Manual GitLab | GitLab: Create projects and add scripts]]&lt;br /&gt;
* [[Monitoring_executions | Monitoring job execution]]&lt;br /&gt;
* [[Shared_folders | Working with shared folders in the Lustre file system]]&lt;br /&gt;
* [[Old_binaries | Running older binaries on the updated OS]]&lt;br /&gt;
* [[locale_settings | How to change language settings for yourself]]&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[Maintenance_and_Management | Maintenance and Management]]&lt;br /&gt;
* [[About_ABGC | About ABGC]]&lt;br /&gt;
* [[Computer_cluster | High Performance Computing @ABGC]]&lt;br /&gt;
* [[Lustre_PFS_layout | Lustre Parallel File System layout]]&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
{| width=&amp;quot;90%&amp;quot;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| width=&amp;quot;30%&amp;quot; |&lt;br /&gt;
* [https://www.wur.nl/en/Value-Creation-Cooperation/Facilities/Wageningen-Shared-Research-Facilities/Our-facilities/Show/High-Performance-Computing-Cluster-HPC-Anunna.htm SRF offers a HPC facilty]&lt;br /&gt;
| width=&amp;quot;30%&amp;quot; |&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Scientific_Linux Scientific Linux]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Help:Cheatsheet Help with editing Wiki pages]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Using_the_File_browser&amp;diff=2637</id>
		<title>Using the File browser</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Using_the_File_browser&amp;diff=2637"/>
		<updated>2026-02-25T14:12:08Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: Basic file browser information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Open Ondemand provides a web based file browser to Anunna, which provides a convenient and easy interface for managing fiiles. &lt;br /&gt;
&lt;br /&gt;
By default the file browser points to the user&#039;s  home directory, but shortcuts to lustre and archive are provided in the left side bar. Alterntively users can use the change directory button and type a location they would like to see displayed&lt;br /&gt;
&lt;br /&gt;
* Upload files&lt;br /&gt;
* Download files&lt;br /&gt;
* Create files and directories&lt;br /&gt;
* Delete files and directories&lt;br /&gt;
* Move files and directories&lt;br /&gt;
* Edit files&lt;br /&gt;
&lt;br /&gt;
These features, including editing feature can be acessed by using the dot menu next to the file name. The editor is very basic and only suitable for editing one file at a time. &lt;br /&gt;
&lt;br /&gt;
Note that, despite having the option to upload and download files, this file browser is not suitable for files larges than a couple of gigabytes.&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Main_Page&amp;diff=2636</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Main_Page&amp;diff=2636"/>
		<updated>2026-02-25T13:30:50Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: /* Browser apps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Anunna is a [http://en.wikipedia.org/wiki/High-performance_computing High Performance Computer] (HPC) infrastructure hosted by [https://www.wur.nl/en/show/supercomputer-anunna-opens-up-more-opportunities-for-data-storage-and-artificial-intelligence-applications.htm Wageningen University &amp;amp; Research Centre]. It is open for use for all WUR research groups as well as other organizations, including companies, that have collaborative projects with WUR. &lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
&lt;br /&gt;
* [[History of the Cluster|Historical information on the startup of Anunna]]&lt;br /&gt;
&lt;br /&gt;
== Access Policy ==&lt;br /&gt;
[[Access_Policy | Main Article: Access Policy]]&lt;br /&gt;
&lt;br /&gt;
Access needs to be granted actively (by creation of an account on the cluster by FB-IT). Use of resources is limited by the scheduler. Note that the use of Anunna is not free of charge. &lt;br /&gt;
&lt;br /&gt;
= Our Courses =&lt;br /&gt;
The Anunna team organizes HPC courses three times a year to strengthen basic &amp;amp; more advanced skills and enable users to make the most effective use of our facility.&lt;br /&gt;
&lt;br /&gt;
== [[Linux Basic]] ==&lt;br /&gt;
&lt;br /&gt;
== [[HPC Basic]] ==&lt;br /&gt;
&lt;br /&gt;
== [[HPC Advanced]] ==&lt;br /&gt;
&lt;br /&gt;
== [[2026 Course dates]] ==&lt;br /&gt;
&lt;br /&gt;
= Using Anunna =&lt;br /&gt;
* [[Tariffs | Costs associated with resource usage]]&lt;br /&gt;
&lt;br /&gt;
== Gaining access to Anunna==&lt;br /&gt;
Access to the cluster and file transfer are traditionally done via [http://en.wikipedia.org/wiki/Secure_Shell SSH and SFTP].&lt;br /&gt;
* [[log_in_to_B4F_cluster | Logging into cluster using ssh]]&lt;br /&gt;
* [[file_transfer | File transfer options]]&lt;br /&gt;
* [[Services | Alternative access methods, and extra features and services on Anunna]]&lt;br /&gt;
* [[Filesystems | Data storage methods on Anunna]]&lt;br /&gt;
&lt;br /&gt;
== Using Anunna for courses (mainly jupyter notebooks) ==&lt;br /&gt;
* [[steps_for_courses | Steps involved to run a course on Anunna]]&lt;br /&gt;
 &lt;br /&gt;
= Events =&lt;br /&gt;
&lt;br /&gt;
* [[Courses]] that have happened and are happening&lt;br /&gt;
* [[Downtime]] that will affect all users&lt;br /&gt;
* [[Meetings]] that may affect the policies of Anunna&lt;br /&gt;
&lt;br /&gt;
= Software =&lt;br /&gt;
* [[Modules]]&lt;br /&gt;
* [[Apptainer]]&lt;br /&gt;
* [[Python]]&lt;br /&gt;
* [[R]] &lt;br /&gt;
* [[Julia]]&lt;br /&gt;
&lt;br /&gt;
== Browser apps ==&lt;br /&gt;
This page provides an overview of the GUI-based applications available Anunna, including background information and practical guidance on how to access and use interactive desktops and graphical tools directly from your web browser.&lt;br /&gt;
&lt;br /&gt;
* [[General overview|General Overview]]&lt;br /&gt;
* [[Using the Shell|Anunna Shell Access]]&lt;br /&gt;
* [[Using the File browser|File Browser]]&lt;br /&gt;
* [[Jupyter|Featured Apps]]&lt;br /&gt;
* [[Jupyter]]&lt;br /&gt;
* [[RStudio|R Studio]]&lt;br /&gt;
* [[Linux desktop|Linux Desktop]]&lt;br /&gt;
* [[Requesting new software|Requesting New Software]]&lt;br /&gt;
&lt;br /&gt;
== Command-line Software ==&lt;br /&gt;
&lt;br /&gt;
==== Cluster Scheduler ====&lt;br /&gt;
Anunna uses Slurm as job scheduler.&lt;br /&gt;
* [[Using_Slurm | Submit jobs with Slurm]]&lt;br /&gt;
* [[node_usage_graph | Be aware of how much work the cluster is under right now with &#039;node_usage_graph&#039;]]&lt;br /&gt;
* [[SLURM_Compare | Rosetta Stone of Workload Managers]]&lt;br /&gt;
&lt;br /&gt;
==== [[Globally installed software]] ====&lt;br /&gt;
&lt;br /&gt;
==== [[ABGC_modules |ABGC specific modules]] ====&lt;br /&gt;
&lt;br /&gt;
==== Installation of software by users ====&lt;br /&gt;
* [[Domain_specific_software_on_B4Fcluster_installation_by_users | Installing domain specific software: installation by users]]&lt;br /&gt;
* [[Setting local variables]]&lt;br /&gt;
* [[Installing_R_packages_locally | Installing R packages locally]]&lt;br /&gt;
* [[Setting_up_Python_virtualenv | Setting up and using a virtual environment for Python3 ]]&lt;br /&gt;
* [[Virtual_environment_Python_3.4_or_higher | Setting up and using a virtual environment for Python3.4 or higher ]]&lt;br /&gt;
* [[Installing WRF and WPS]]&lt;br /&gt;
* [[Running scripts on a fixed timeschedule (cron)]]&lt;br /&gt;
&lt;br /&gt;
= Useful Notes = &lt;br /&gt;
&lt;br /&gt;
== Being in control of Environment parameters ==&lt;br /&gt;
&lt;br /&gt;
* [[Using_environment_modules | Using environment modules]]&lt;br /&gt;
* [[Aliases and local variables]]&lt;br /&gt;
* [[Setting local variables]]&lt;br /&gt;
* [[Setting_TMPDIR | Set a custom temporary directory location]]&lt;br /&gt;
* [[Installing_R_packages_locally | Installing R packages locally]]&lt;br /&gt;
* [[Setting_up_Python_virtualenv | Setting up and using a virtual environment for Python3 ]]&lt;br /&gt;
* [[Locale_settings]] (how numbers and dates are displayed)&lt;br /&gt;
&lt;br /&gt;
== Controlling costs ==&lt;br /&gt;
&lt;br /&gt;
* [[SACCT | using SACCT to see your costs]]&lt;br /&gt;
* [[get_my_bill | using the &amp;quot;get_my_bill&amp;quot; script to estimate costs]]&lt;br /&gt;
&lt;br /&gt;
== Management ==&lt;br /&gt;
Product Owner of Anunna is Alexander van Ittersum (Wageningen UR,FB-IT, C&amp;amp;PS). [[User: prins089 | Fons Prinsen (Wageningen UR, FB-IT, C&amp;amp;PS)]] is responsible for [[Maintenance_and_Management | Maintenance and Management]] of the cluster.&lt;br /&gt;
&lt;br /&gt;
* [[Roadmap | Ambitions regarding innovation, support and administration of Anunna ]]&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
* [[Bioinformatics_tips_tricks_workflows |Bioinformatics tips, tricks, and workflows]]&lt;br /&gt;
* [[Parallel_R_code_on_SLURM | Running parallel R code on SLURM]]&lt;br /&gt;
* [[Convert_between_MediaWiki_and_other_formats | Convert between MediaWiki format and other formats]]&lt;br /&gt;
* [[Manual GitLab | GitLab: Create projects and add scripts]]&lt;br /&gt;
* [[Monitoring_executions | Monitoring job execution]]&lt;br /&gt;
* [[Shared_folders | Working with shared folders in the Lustre file system]]&lt;br /&gt;
* [[Old_binaries | Running older binaries on the updated OS]]&lt;br /&gt;
* [[locale_settings | How to change language settings for yourself]]&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[Maintenance_and_Management | Maintenance and Management]]&lt;br /&gt;
* [[About_ABGC | About ABGC]]&lt;br /&gt;
* [[Computer_cluster | High Performance Computing @ABGC]]&lt;br /&gt;
* [[Lustre_PFS_layout | Lustre Parallel File System layout]]&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
{| width=&amp;quot;90%&amp;quot;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| width=&amp;quot;30%&amp;quot; |&lt;br /&gt;
* [https://www.wur.nl/en/Value-Creation-Cooperation/Facilities/Wageningen-Shared-Research-Facilities/Our-facilities/Show/High-Performance-Computing-Cluster-HPC-Anunna.htm SRF offers a HPC facilty]&lt;br /&gt;
| width=&amp;quot;30%&amp;quot; |&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Scientific_Linux Scientific Linux]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Help:Cheatsheet Help with editing Wiki pages]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=RStudio&amp;diff=2635</id>
		<title>RStudio</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=RStudio&amp;diff=2635"/>
		<updated>2026-02-25T12:17:12Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: Rstudio&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;RStudio integrated development environment (IDE&#039;&#039;&#039;) is a set of tools built to help you be more productive with R and Python. &lt;br /&gt;
[[File:RStudio-form-20260225.png|thumb|595x595px|Resource Allocation Form]]&lt;br /&gt;
RStudio is built with the aid of EasyBuild and makes use of the relevant R modules available at Anunna&lt;br /&gt;
&lt;br /&gt;
Rstudio can be found both in the All Applications Menu at the navigation bar, and as a button in the Featured Apps speed dial. By clicking in either option, the user will be taken to a form where they will be able to allocate resources for their RStudio session. &lt;br /&gt;
&lt;br /&gt;
=== Resource Allocation form ===&lt;br /&gt;
The resource allocation form allows the use to select the following options&lt;br /&gt;
&lt;br /&gt;
* R version&lt;br /&gt;
* Partition: main by default but the GPU partition is available&lt;br /&gt;
* Number of Hours: Max 4 hours&lt;br /&gt;
* Number of CPUs: CPU cores available&lt;br /&gt;
* Memory : Amount of RAM available&lt;br /&gt;
* Number of GPUs: Zero by default,  this need to be switched to, at least 1&lt;br /&gt;
** Note that the GPU partition must be selected&lt;br /&gt;
* Comment:  Project number that will show up at your bill&lt;br /&gt;
* Slurm options: Slurm flag overrides. &lt;br /&gt;
&lt;br /&gt;
=== Connecting to an active session ===&lt;br /&gt;
Once the form has been filled, the use can then click on the Launch button. This cause the screen to switch to the interactive sessions page where a new session will be listed. &lt;br /&gt;
&lt;br /&gt;
Once the session is ready a &amp;quot;Connect to RStudio Server&amp;quot; button will appear which will allow the user to (re)connect to the corresponding active session. &lt;br /&gt;
&lt;br /&gt;
The card also has a red &amp;quot;Cancel&amp;quot; button where the user may terminate their session.&lt;br /&gt;
[[File:RStudio-connect-20260225.png|center|thumb|509x509px|RStudio active session card at My Interactive Sessions]]&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=File:RStudio-connect-20260225.png&amp;diff=2634</id>
		<title>File:RStudio-connect-20260225.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=File:RStudio-connect-20260225.png&amp;diff=2634"/>
		<updated>2026-02-25T12:15:04Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;RStudio connection card&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=File:RStudio-form-20260225.png&amp;diff=2633</id>
		<title>File:RStudio-form-20260225.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=File:RStudio-form-20260225.png&amp;diff=2633"/>
		<updated>2026-02-25T11:59:48Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Rstudio resource allocation form&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=General_overview&amp;diff=2632</id>
		<title>General overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=General_overview&amp;diff=2632"/>
		<updated>2026-02-25T11:45:12Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: bla&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== GUI Applications on Anunna ===&lt;br /&gt;
Anunna provides access to desktop environments and GUI-based applications to support interactive research workflows. The environment is built on Open OnDemand, an open-source web portal that connects users to HPC resources through a web browser. The platform enables secure job submission, interactive desktop sessions, file management, and access to applications without requiring command-line interaction.&lt;br /&gt;
[[File:OOD20260225.png|thumb|716x716px|apps.anunna.wur.nl]]&lt;br /&gt;
The portal consists of a dashboard with the following features&lt;br /&gt;
&lt;br /&gt;
* Navigation Bar&lt;br /&gt;
* Message of the day/Announcements&lt;br /&gt;
* Feature Applications&lt;br /&gt;
&lt;br /&gt;
==== Navigation bar ====&lt;br /&gt;
Provides access to the &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;All Applications:&#039;&#039;&#039;  A list of all GUI applications available at Anunna.&lt;br /&gt;
* &#039;&#039;&#039;Jobs:&#039;&#039;&#039; An interactive list of all jobs running at Anunna.&lt;br /&gt;
* &#039;&#039;&#039;Courses:&#039;&#039;&#039; Active education courses available at the HPC.&lt;br /&gt;
* &#039;&#039;&#039;My Interactive Sessions:&#039;&#039;&#039; An overview of your past and currently active sessions.&lt;br /&gt;
* &#039;&#039;&#039;Help Menu:&#039;&#039;&#039; Collection of links and knowledge articles relevant to Anunna&lt;br /&gt;
&lt;br /&gt;
==== Message of the Day ====&lt;br /&gt;
This section is dedicated for annoucements and general communication from the HPC team. &lt;br /&gt;
&lt;br /&gt;
=== Featured Applications ===&lt;br /&gt;
Highlights of commonly used applications, including:&lt;br /&gt;
* [[Using the File browser|File Browser]]&lt;br /&gt;
&lt;br /&gt;
* [[Using the Shell|Shell Access to Anunna]]&lt;br /&gt;
* [[R Studio]]&lt;br /&gt;
* Active courses currently using Anunna resources&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Access ===&lt;br /&gt;
The portal is available at:&lt;br /&gt;
&lt;br /&gt;
https://apps.anunna.wur.nl&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additional applications may be available depending on user permissions and project allocations. They can be found in the Menu under &amp;quot;All Applications&amp;quot;&lt;br /&gt;
.[[File:Menu Bar Anunna GUI-apps.png|left|thumb]]&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=File:OOD20260225.png&amp;diff=2631</id>
		<title>File:OOD20260225.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=File:OOD20260225.png&amp;diff=2631"/>
		<updated>2026-02-25T11:42:18Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Current snapshot of the Anunna Apps interface&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Linux_Basic&amp;diff=2630</id>
		<title>Linux Basic</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Linux_Basic&amp;diff=2630"/>
		<updated>2026-02-25T09:56:46Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: Add description to the links and upload slides.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Are you interested in using the High Performance Computing (HPC) Cluster but lack basic Linux knowledge? Join our free 5-hour course on Linux fundamentals for working on the HPC. You will learn the essential Linux commands and skills needed to efficiently navigate the system and automate repetitive tasks.&lt;br /&gt;
&lt;br /&gt;
The course is organized by the Anunna team and SRF, with contributions from WUR scientists experienced in working with the HPC.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Prerequisites:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Please bring your laptop so you can actively participate and complete the hands-on exercises during the workshop.&lt;br /&gt;
See [[2026 Course dates]] for more information on scheduling and registration details.&lt;br /&gt;
&lt;br /&gt;
==== Self-study material: ====&lt;br /&gt;
If you are not able to attend the course, you can make use of the following resources&lt;br /&gt;
&lt;br /&gt;
* [[:File:WUR Linux Basics Course 2026 Feb.pdf|Latest Slides]]: Slides of the latest course session offered at thw WUR &lt;br /&gt;
* [https://labex.io/linuxjourney Linux Journey]: Great site for self-paced learning about linux. It offers free virtual machines for training&lt;br /&gt;
* [https://www.linux-path.com/en Linux Path]: Fork of Linux journey, has additional curated&lt;br /&gt;
* [https://carpentries.org Software Carpentry]: Community of free lessons on many topics. For linux click Learn &amp;gt; lessons &amp;gt; Unix shell.&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=File:WUR_Linux_Basics_Course_2026_Feb.pdf&amp;diff=2629</id>
		<title>File:WUR Linux Basics Course 2026 Feb.pdf</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=File:WUR_Linux_Basics_Course_2026_Feb.pdf&amp;diff=2629"/>
		<updated>2026-02-25T09:50:14Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: Latest Linux Basics slides from the Feb/26 session&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Latest Linux Basics slides from the Feb/26 session&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Linux_Basic&amp;diff=2628</id>
		<title>Linux Basic</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Linux_Basic&amp;diff=2628"/>
		<updated>2026-02-25T09:48:42Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: Add external self-study links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Are you interested in using the High Performance Computing (HPC) Cluster but lack basic Linux knowledge? Join our free 5-hour course on Linux fundamentals for working on the HPC. You will learn the essential Linux commands and skills needed to efficiently navigate the system and automate repetitive tasks.&lt;br /&gt;
&lt;br /&gt;
The course is organized by the Anunna team and SRF, with contributions from WUR scientists experienced in working with the HPC.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Prerequisites:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Please bring your laptop so you can actively participate and complete the hands-on exercises during the workshop.&lt;br /&gt;
See [[2026 Course dates]] for more information on scheduling and registration details.&lt;br /&gt;
&lt;br /&gt;
==== Self-study material: ====&lt;br /&gt;
If you are not able to attend the course, you can make use of the following resources&lt;br /&gt;
&lt;br /&gt;
* Latest Slides: &lt;br /&gt;
* [https://labex.io/linuxjourney Linux Journey]&lt;br /&gt;
* [https://www.linux-path.com/en Linux Path]&lt;br /&gt;
* [https://carpentries.org Software Carpentry]&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=File:WUR_Linux_Basics_Course.pdf&amp;diff=2627</id>
		<title>File:WUR Linux Basics Course.pdf</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=File:WUR_Linux_Basics_Course.pdf&amp;diff=2627"/>
		<updated>2026-02-25T09:40:24Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Slides for the latest linux basics course offered at the WUR&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Main_Page&amp;diff=2611</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Main_Page&amp;diff=2611"/>
		<updated>2026-02-24T14:54:56Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: /* Browser apps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Anunna is a [http://en.wikipedia.org/wiki/High-performance_computing High Performance Computer] (HPC) infrastructure hosted by [https://www.wur.nl/en/show/supercomputer-anunna-opens-up-more-opportunities-for-data-storage-and-artificial-intelligence-applications.htm Wageningen University &amp;amp; Research Centre]. It is open for use for all WUR research groups as well as other organizations, including companies, that have collaborative projects with WUR. &lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
&lt;br /&gt;
* [[History of the Cluster|Historical information on the startup of Anunna]]&lt;br /&gt;
&lt;br /&gt;
== Access Policy ==&lt;br /&gt;
[[Access_Policy | Main Article: Access Policy]]&lt;br /&gt;
&lt;br /&gt;
Access needs to be granted actively (by creation of an account on the cluster by FB-IT). Use of resources is limited by the scheduler. Note that the use of Anunna is not free of charge. &lt;br /&gt;
&lt;br /&gt;
= Our Courses =&lt;br /&gt;
The Anunna team organizes HPC courses three times a year to strengthen basic &amp;amp; more advanced skills and enable users to make the most effective use of our facility.&lt;br /&gt;
&lt;br /&gt;
== [[Linux Basic]] ==&lt;br /&gt;
&lt;br /&gt;
== [[HPC Basic]] ==&lt;br /&gt;
&lt;br /&gt;
== [[HPC Advanced]] ==&lt;br /&gt;
&lt;br /&gt;
== [[2026 Course dates]] ==&lt;br /&gt;
&lt;br /&gt;
= Using Anunna =&lt;br /&gt;
* [[Tariffs | Costs associated with resource usage]]&lt;br /&gt;
&lt;br /&gt;
== Gaining access to Anunna==&lt;br /&gt;
Access to the cluster and file transfer are traditionally done via [http://en.wikipedia.org/wiki/Secure_Shell SSH and SFTP].&lt;br /&gt;
* [[log_in_to_B4F_cluster | Logging into cluster using ssh]]&lt;br /&gt;
* [[file_transfer | File transfer options]]&lt;br /&gt;
* [[Services | Alternative access methods, and extra features and services on Anunna]]&lt;br /&gt;
* [[Filesystems | Data storage methods on Anunna]]&lt;br /&gt;
&lt;br /&gt;
== Using Anunna for courses (mainly jupyter notebooks) ==&lt;br /&gt;
* [[steps_for_courses | Steps involved to run a course on Anunna]]&lt;br /&gt;
 &lt;br /&gt;
= Events =&lt;br /&gt;
&lt;br /&gt;
* [[Courses]] that have happened and are happening&lt;br /&gt;
* [[Downtime]] that will affect all users&lt;br /&gt;
* [[Meetings]] that may affect the policies of Anunna&lt;br /&gt;
&lt;br /&gt;
= Software =&lt;br /&gt;
* [[Modules]]&lt;br /&gt;
* [[Apptainer]]&lt;br /&gt;
* [[Python]]&lt;br /&gt;
* [[R]] &lt;br /&gt;
* [[Julia]]&lt;br /&gt;
&lt;br /&gt;
== Browser apps ==&lt;br /&gt;
bla bla&lt;br /&gt;
&lt;br /&gt;
* [[General overview]]&lt;br /&gt;
* [[Using the Shell]]&lt;br /&gt;
* [[Using the File browser]]&lt;br /&gt;
* [[Jupyter|Featured apps]]&lt;br /&gt;
* [[Jupyter]]&lt;br /&gt;
* [[RStudio|R Studio]]&lt;br /&gt;
* [[Linux desktop]]&lt;br /&gt;
* [[Requesting new software]]&lt;br /&gt;
&lt;br /&gt;
== Command-line Software ==&lt;br /&gt;
&lt;br /&gt;
==== Cluster Scheduler ====&lt;br /&gt;
Anunna uses Slurm as job scheduler.&lt;br /&gt;
* [[Using_Slurm | Submit jobs with Slurm]]&lt;br /&gt;
* [[node_usage_graph | Be aware of how much work the cluster is under right now with &#039;node_usage_graph&#039;]]&lt;br /&gt;
* [[SLURM_Compare | Rosetta Stone of Workload Managers]]&lt;br /&gt;
&lt;br /&gt;
==== [[Globally installed software]] ====&lt;br /&gt;
&lt;br /&gt;
==== [[ABGC_modules |ABGC specific modules]] ====&lt;br /&gt;
&lt;br /&gt;
==== Installation of software by users ====&lt;br /&gt;
* [[Domain_specific_software_on_B4Fcluster_installation_by_users | Installing domain specific software: installation by users]]&lt;br /&gt;
* [[Setting local variables]]&lt;br /&gt;
* [[Installing_R_packages_locally | Installing R packages locally]]&lt;br /&gt;
* [[Setting_up_Python_virtualenv | Setting up and using a virtual environment for Python3 ]]&lt;br /&gt;
* [[Virtual_environment_Python_3.4_or_higher | Setting up and using a virtual environment for Python3.4 or higher ]]&lt;br /&gt;
* [[Installing WRF and WPS]]&lt;br /&gt;
* [[Running scripts on a fixed timeschedule (cron)]]&lt;br /&gt;
&lt;br /&gt;
= Useful Notes = &lt;br /&gt;
&lt;br /&gt;
== Being in control of Environment parameters ==&lt;br /&gt;
&lt;br /&gt;
* [[Using_environment_modules | Using environment modules]]&lt;br /&gt;
* [[Aliases and local variables]]&lt;br /&gt;
* [[Setting local variables]]&lt;br /&gt;
* [[Setting_TMPDIR | Set a custom temporary directory location]]&lt;br /&gt;
* [[Installing_R_packages_locally | Installing R packages locally]]&lt;br /&gt;
* [[Setting_up_Python_virtualenv | Setting up and using a virtual environment for Python3 ]]&lt;br /&gt;
* [[Locale_settings]] (how numbers and dates are displayed)&lt;br /&gt;
&lt;br /&gt;
== Controlling costs ==&lt;br /&gt;
&lt;br /&gt;
* [[SACCT | using SACCT to see your costs]]&lt;br /&gt;
* [[get_my_bill | using the &amp;quot;get_my_bill&amp;quot; script to estimate costs]]&lt;br /&gt;
&lt;br /&gt;
== Management ==&lt;br /&gt;
Product Owner of Anunna is Alexander van Ittersum (Wageningen UR,FB-IT, C&amp;amp;PS). [[User: prins089 | Fons Prinsen (Wageningen UR, FB-IT, C&amp;amp;PS)]] is responsible for [[Maintenance_and_Management | Maintenance and Management]] of the cluster.&lt;br /&gt;
&lt;br /&gt;
* [[Roadmap | Ambitions regarding innovation, support and administration of Anunna ]]&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
* [[Bioinformatics_tips_tricks_workflows |Bioinformatics tips, tricks, and workflows]]&lt;br /&gt;
* [[Parallel_R_code_on_SLURM | Running parallel R code on SLURM]]&lt;br /&gt;
* [[Convert_between_MediaWiki_and_other_formats | Convert between MediaWiki format and other formats]]&lt;br /&gt;
* [[Manual GitLab | GitLab: Create projects and add scripts]]&lt;br /&gt;
* [[Monitoring_executions | Monitoring job execution]]&lt;br /&gt;
* [[Shared_folders | Working with shared folders in the Lustre file system]]&lt;br /&gt;
* [[Old_binaries | Running older binaries on the updated OS]]&lt;br /&gt;
* [[locale_settings | How to change language settings for yourself]]&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[Maintenance_and_Management | Maintenance and Management]]&lt;br /&gt;
* [[About_ABGC | About ABGC]]&lt;br /&gt;
* [[Computer_cluster | High Performance Computing @ABGC]]&lt;br /&gt;
* [[Lustre_PFS_layout | Lustre Parallel File System layout]]&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
{| width=&amp;quot;90%&amp;quot;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| width=&amp;quot;30%&amp;quot; |&lt;br /&gt;
* [https://www.wur.nl/en/Value-Creation-Cooperation/Facilities/Wageningen-Shared-Research-Facilities/Our-facilities/Show/High-Performance-Computing-Cluster-HPC-Anunna.htm SRF offers a HPC facilty]&lt;br /&gt;
| width=&amp;quot;30%&amp;quot; |&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Scientific_Linux Scientific Linux]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Help:Cheatsheet Help with editing Wiki pages]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Open_OnDemand&amp;diff=2606</id>
		<title>Open OnDemand</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Open_OnDemand&amp;diff=2606"/>
		<updated>2026-02-24T14:48:05Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Anunna provides a web portal allowing users to access the HPC via their web browser. This is is made possible via  the Open OnDemand  Project, which is a web based system that proves a Graphical User Interface (GUI) for applications in the HPC. The portal can be accessed at &amp;lt;nowiki&amp;gt;https://app.anunna.wur.nl&amp;lt;/nowiki&amp;gt; . &lt;br /&gt;
&lt;br /&gt;
* Apps&lt;br /&gt;
* File Browser&lt;br /&gt;
* Jobs&lt;br /&gt;
* Courses&lt;br /&gt;
* Message of the day&lt;br /&gt;
* Featured apps&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Steps_for_courses&amp;diff=2541</id>
		<title>Steps for courses</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Steps_for_courses&amp;diff=2541"/>
		<updated>2026-01-12T15:50:36Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
To be able to run a course on Anunna, there are a couple of steps to take as a teacher&lt;br /&gt;
&lt;br /&gt;
* Create accounts for all involved (Teachers/TA&#039;s/students) and reservations for the course&lt;br /&gt;
** You can start with the teachers and TA&#039;s, and add the students later once they are known&lt;br /&gt;
** Use [https://support.wur.nl/esc?id=sc_cat_item&amp;amp;table=sc_cat_item&amp;amp;sys_id=f4de15c047df9550d7dd9880236d43a5&amp;amp;searchTerm=HPC this] Service Now form to request the accounts you need.&lt;br /&gt;
* If you want to use Jupyter:&lt;br /&gt;
** Create and test your own kernel, there are multiple options for this:&lt;br /&gt;
*** [[Python]]&lt;br /&gt;
*** [[R]] (coming)&lt;br /&gt;
** Create a ticket to get your kernel added to the list in https://notebook.anunna.wur.nl&lt;br /&gt;
** To ease the use of the service, we give courses a dropdown to set up number of CPUs/memory/runtime. Please create a ticket to ask us to add your course to the dropdown menu.&lt;br /&gt;
&lt;br /&gt;
Besides the above interactions, the HPC admin team will also:&lt;br /&gt;
* Create a teams chat between the course organisers and administrators, so we have a hotline in case of issues.&lt;br /&gt;
* Be present at the start of your course (if on campus), to smooth out any issues that might arise at the start (missing/not working accounts)&lt;br /&gt;
&lt;br /&gt;
If there are any issues, please have a look at [[Hints for courses]]&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Steps_for_courses&amp;diff=2540</id>
		<title>Steps for courses</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Steps_for_courses&amp;diff=2540"/>
		<updated>2026-01-12T15:47:47Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: Update procedure&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
To be able to run a course on Anunna, there are a couple of steps to take as a teacher&lt;br /&gt;
&lt;br /&gt;
* Create accounts for all involved (Teachers/TA&#039;s/students) and reservations for the course&lt;br /&gt;
** You can start with the teachers and TA&#039;s, and add the students later once they are known&lt;br /&gt;
** Use [https://support.wur.nl/esc?id=sc_cat_item&amp;amp;table=sc_cat_item&amp;amp;sys_id=f4de15c047df9550d7dd9880236d43a5&amp;amp;searchTerm=HPC this] Service Now form to request the accounts you need.&lt;br /&gt;
* If you want to use Jupyter:&lt;br /&gt;
** Create and test your own kernel, there are multiple options for this:&lt;br /&gt;
*** [[Setting_up_Python_virtualenv#Virtualenv_kernels_in_Jupyter|virtualenv]]&lt;br /&gt;
*** [[Conda_for_teaching|conda]]&lt;br /&gt;
** Create a ticket to get your kernel added to the list in https://notebook.anunna.wur.nl&lt;br /&gt;
** To ease the use of the service, we give courses a dropdown to set up number of CPUs/memory/runtime. Please create a ticket to ask us to add your course to the dropdown menu.&lt;br /&gt;
&lt;br /&gt;
Besides the above interactions, the HPC admin team will also:&lt;br /&gt;
* Create a teams chat between the course organisers and administrators, so we have a hotline in case of issues.&lt;br /&gt;
* Be present at the start of your course (if on campus), to smooth out any issues that might arise at the start (missing/not working accounts)&lt;br /&gt;
&lt;br /&gt;
If there are any issues, please have a look at [[Hints for courses]]&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials&amp;diff=2533</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials&amp;diff=2533"/>
		<updated>2025-11-20T17:13:27Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: Tutorials Page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Tutorials ==&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
[[Create Your Own Modules]]&lt;br /&gt;
&lt;br /&gt;
=== Apptainer ===&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Modules&amp;diff=2532</id>
		<title>Modules</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Modules&amp;diff=2532"/>
		<updated>2025-11-20T16:28:41Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: Updates&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Modules in anunna ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Anunna uses modules via Lmod to provide software to their users. A module configures the environment of the user and/or their jobs to enable the desired application to run.&lt;br /&gt;
These modules are organized in &amp;quot;buckets&amp;quot; for each year. We intend to keep three buckets of software, one for the current year, one for the previous year and another for legacy software. The legacy module should contain software that is older than two years and is still used or relevant.&lt;br /&gt;
&lt;br /&gt;
The point is to have a conveyor belt of software and have more up-to-date software with more modern build tools (GCC, MPI, intel), which makes the software more maintainable. The conveyor belt also enables the use of more modern toolchains (foss, intel), which will enable software to run more efficiently.&lt;br /&gt;
&lt;br /&gt;
For each bucket, we intend to keep one version of software. These are the buckets currently available at Anunna: legacy, utilities, groups, 2023, 2024 and GPU&lt;br /&gt;
&lt;br /&gt;
The new modules have been built with the aid of EasyBuild (https://easybuild.io/)&lt;br /&gt;
&lt;br /&gt;
EasyBuild makes use of publicly shared recipe&#039;s, called easyconfigs. Have a look at their repository for available software:&lt;br /&gt;
&lt;br /&gt;
https://github.com/easybuilders/easybuild-easyconfigs/tree/develop/easybuild/easyconfigs&lt;br /&gt;
&lt;br /&gt;
===Requesting Modules===&lt;br /&gt;
&lt;br /&gt;
If a module you require is not available, please submit a software request at https://ideas.anunna.wur.nl . There you are able to follow the progress of the software you need and upvote the request of other users. The software or features with more upvotes will be prioritised sooner. &lt;br /&gt;
&lt;br /&gt;
===Module Organization===&lt;br /&gt;
&lt;br /&gt;
Modules are to be organized into buckets by year or additional categories. Current buckets are&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;legacy&#039;&#039;&#039; - old software that is no longer maintained or updated, but it is still used in active research.&lt;br /&gt;
* &#039;&#039;&#039;2023&#039;&#039;&#039; - software built using the 2023 compilers and toolchain. It is meant to contain a single version of each software.&lt;br /&gt;
* &#039;&#039;&#039;2024&#039;&#039;&#039; - software built using the 2024 compilers and toolchain. It is meant to contain a single version of each software.&lt;br /&gt;
* &#039;&#039;&#039;utilities&#039;&#039;&#039; - software that is not dependent on specific compilers or toolchains.&lt;br /&gt;
* &#039;&#039;&#039;groups&#039;&#039;&#039; -  This bucket contains subfolders containing module files for groups in and outside the WUR. &lt;br /&gt;
* &#039;&#039;&#039;GPU&#039;&#039;&#039; - CUDA, cuDNN and related packages that are independent of toolchains&lt;br /&gt;
&lt;br /&gt;
In order to access the modules of the &#039;&#039;&#039;2023&#039;&#039;&#039; bucket one needs to execute the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module load 2023&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards, the list of available modules is expanded and this can be verified by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module avail&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Why Buckets?===&lt;br /&gt;
&lt;br /&gt;
As time goes by, software is developed with newer compilers and tools. So the buckets are snapshots of these new compilers and tools that have been used to develop and build these pieces of software. The compilers will determine which processor operations will be supported by the software, so if a job runs software from two different compilers conflicts, errors or unwanted behaviour may occur. &lt;br /&gt;
&lt;br /&gt;
Therefore, it is best to have jobs with software built from the same compiler. This is the purpose of the buckets, where all the software should be built with the same compiler.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
===Listing Modules===&lt;br /&gt;
&lt;br /&gt;
The commands that hereby follow will list the modules available to the user in increansing detail. &#039;&#039;&#039;overview&#039;&#039;&#039; provides a top level view of the software available without going into detail about the different versions available. It will only list the software and the number of versions. The &#039;&#039;&#039;avail&#039;&#039;&#039; command will list the different versions of the same software. Finally, &#039;&#039;&#039;spider&#039;&#039;&#039; will provide a verbose list with all the different versions and the description of each.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module overview&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module avail&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module spider&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Searching For Modules===&lt;br /&gt;
&lt;br /&gt;
The same commands used for listing modules can be used for searching, the only difference is that that the name of the module is passed as an argument. Like the listing in the section above, the commands provide different levels of verbosity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module overview &amp;lt;nameOfModule&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module avail &amp;lt;nameOfModule&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module spider &amp;lt;nameOfModule&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Searching For Keywords===&lt;br /&gt;
&lt;br /&gt;
As a more advanced search feature, one can search for keywords inside of modules. This is useful when searching for which modules contain a specific Python or R extension. There are bundle modules for both languages that contain a list of their extensions. Lmod will also search inside the description of the modules, which can be useful for discoverability.&lt;br /&gt;
&lt;br /&gt;
This feature can be used with the following command template: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module key &amp;lt;keyword&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To illustrate, say that one needs to find a module with the R packager &#039;&#039;&#039;terra&#039;&#039;&#039; installed. The first step would be to load one of the buckets, for instance 2023. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module load 2023&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, the next step would be to apply the key template above&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module key terra&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which yields the following results&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The following modules match your search criteria: &amp;quot;terra&amp;quot;&lt;br /&gt;
--------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
  R-bundle-CRAN: R-bundle-CRAN/2023.12-foss-2023a&lt;br /&gt;
    Bundle of R packages from CRAN&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------------------------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hence, one would need to load the module &#039;&#039;&#039;R-bundle-CRAN/2023.12-foss-2023a&#039;&#039;&#039; to have access to the &#039;&#039;&#039;terra&#039;&#039;&#039; package&lt;br /&gt;
&lt;br /&gt;
===Loading Modules===&lt;br /&gt;
&lt;br /&gt;
Modules are loaded through the following command template&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module load &amp;lt;moduleName&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The example below show how to load the python module from the 2023 bucket&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module load 2023&lt;br /&gt;
module load Python/3.11.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is good practice to specify the version of the module being loaded for consistency and reproducibility. &lt;br /&gt;
&lt;br /&gt;
If the version of the module is not specified, lmod will choose the default available version at the time and that may change.&lt;br /&gt;
&lt;br /&gt;
By specifying the version in your submit scripts, it transforms the script into additional documentation.&lt;br /&gt;
&lt;br /&gt;
When loading modules, the dependencies of that module will also be loaded with it.&lt;br /&gt;
&lt;br /&gt;
===List Loaded Modules===&lt;br /&gt;
&lt;br /&gt;
Loaded modules can be listed  with following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module list&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the example in the previous section, after loading the 2023 and the Python/3.11.3 modules (and its dependencies), one can this list the modules loaded&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user001@login201:~$ module list&lt;br /&gt;
&lt;br /&gt;
Currently Loaded Modules:&lt;br /&gt;
  1) slurm/24.05.1              (S)   5) binutils/2.40-GCCcore-12.3.0     9) Tcl/8.6.13-GCCcore-12.3.0     13) OpenSSL/1.1&lt;br /&gt;
  2) 2023                             6) bzip2/1.0.8-GCCcore-12.3.0      10) SQLite/3.42.0-GCCcore-12.3.0  14) Python/3.11.3-GCCcore-12.3.0&lt;br /&gt;
  3) GCCcore/12.3.0                   7) ncurses/6.4-GCCcore-12.3.0      11) XZ/5.4.2-GCCcore-12.3.0&lt;br /&gt;
  4) zlib/1.2.13-GCCcore-12.3.0       8) libreadline/8.2-GCCcore-12.3.0  12) libffi/3.4.4-GCCcore-12.3.0&lt;br /&gt;
&lt;br /&gt;
  Where:&lt;br /&gt;
   S:  Module is Sticky, requires --force to unload or purge&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we can see that aside from the slurm modules (which is loaded by default),  the 2023 module and the Python/3.11.3, 11 other dependencies are loaded with the Python/3.11.3 module&lt;br /&gt;
&lt;br /&gt;
===Removing Modules===&lt;br /&gt;
&lt;br /&gt;
Modules can be removed with the following template command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module unload &amp;lt;moduleName&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the example of the python module above, the module can be removed with the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module unload Python/3.11.3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will only unload the Python/3.11.3 module and not its dependencies. &lt;br /&gt;
&lt;br /&gt;
We can see this if we list the loaded modules again&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user001@login201:~$ module unload Python/3.11.3&lt;br /&gt;
user001@login201:~$ module list&lt;br /&gt;
&lt;br /&gt;
Currently Loaded Modules:&lt;br /&gt;
  1) slurm/24.05.1              (S)   5) binutils/2.40-GCCcore-12.3.0     9) Tcl/8.6.13-GCCcore-12.3.0     13) OpenSSL/1.1&lt;br /&gt;
  2) 2023                             6) bzip2/1.0.8-GCCcore-12.3.0      10) SQLite/3.42.0-GCCcore-12.3.0  14) Python/3.11.3-GCCcore-12.3.0&lt;br /&gt;
  3) GCCcore/12.3.0                   7) ncurses/6.4-GCCcore-12.3.0      11) XZ/5.4.2-GCCcore-12.3.0&lt;br /&gt;
  4) zlib/1.2.13-GCCcore-12.3.0       8) libreadline/8.2-GCCcore-12.3.0  12) libffi/3.4.4-GCCcore-12.3.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can completely clean the environment by using the purge command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module purge&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From our example, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;user001@login201:~$ module purge&lt;br /&gt;
The following modules were not unloaded:&lt;br /&gt;
  (Use &amp;quot;module --force purge&amp;quot; to unload all):&lt;br /&gt;
&lt;br /&gt;
  1) slurm/24.05.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The only remaining module is the slurm module with we have set as sticky. &lt;br /&gt;
&lt;br /&gt;
This command is useful to execute in job scripts since it clear the environment of unwanted software that may be loaded by mistake.&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Modules&amp;diff=2531</id>
		<title>Modules</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Modules&amp;diff=2531"/>
		<updated>2025-11-20T16:22:30Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Modules in anunna ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Anunna uses modules via Lmod to provide software to their users. A module configures the environment of the user and/or their jobs to enable the desired application to run.&lt;br /&gt;
These modules are organized in &amp;quot;buckets&amp;quot; for each year. We intend to keep three buckets of software, one for the current year, one for the previous year and another for legacy software. The legacy module should contain software that is older than two years and is still used or relevant.&lt;br /&gt;
&lt;br /&gt;
The point is to have a conveyor belt of software and have more up-to-date software with more modern build tools (GCC, MPI, intel), which makes the software more maintainable. The conveyor belt also enables the use of more modern toolchains (foss, intel), which will enable software to run more efficiently.&lt;br /&gt;
&lt;br /&gt;
For each bucket, we intend to keep one version of software.Currently there are five buckets available: legacy, groups, 2023, 2024 and GPU&lt;br /&gt;
&lt;br /&gt;
The new modules have been built with the aid of EasyBuild (https://easybuild.io/)&lt;br /&gt;
&lt;br /&gt;
EasyBuild makes use of publicly shared recipe&#039;s, called EasyConfigs. Have a look at their repository for available software:&lt;br /&gt;
&lt;br /&gt;
https://github.com/easybuilders/easybuild-easyconfigs/tree/develop/easybuild/easyconfigs&lt;br /&gt;
&lt;br /&gt;
===Requesting Modules===&lt;br /&gt;
&lt;br /&gt;
In principle, all modules from the above listed repository should be available for installation on Anunna. Please reach out to the admins per support ticket if you want to request the installation of a new module. In the future we plan to build a module deployment pipeline with an easy to use user interface, where modules can be requested and installed with minimal admin interference. More on this later..&lt;br /&gt;
&lt;br /&gt;
===Module Organization===&lt;br /&gt;
&lt;br /&gt;
Modules are to be organized into buckets by year or additional categories. Current buckets are&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;legacy&#039;&#039;&#039; - old software that is no longer maintained or updated, but it is still used in active research.&lt;br /&gt;
* &#039;&#039;&#039;2023&#039;&#039;&#039; - software built using the 2023 compilers and toolchain. It is meant to contain a single version of each software.&lt;br /&gt;
* &#039;&#039;&#039;2024&#039;&#039;&#039; - software built using the 2024 compilers and toolchain. It is meant to contain a single version of each software.&lt;br /&gt;
* &#039;&#039;&#039;utilities&#039;&#039;&#039; - software that is not dependent on specific compilers or toolchains.&lt;br /&gt;
* &#039;&#039;&#039;groups&#039;&#039;&#039; -  This bucket contains subfolders containing module files for groups in and outside the WUR. &lt;br /&gt;
* &#039;&#039;&#039;GPU&#039;&#039;&#039; - CUDA, cuDNN and related packages that are independent of toolchains&lt;br /&gt;
&lt;br /&gt;
In order to access the modules of the &#039;&#039;&#039;2023&#039;&#039;&#039; bucket one needs to execute the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module load 2023&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards, the list of available modules is expanded and this can be verified by running&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module avail&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Why Buckets?===&lt;br /&gt;
&lt;br /&gt;
As time goes by, software is developed with newer compilers and tools. So the buckets are snapshots of these new compilers and tools that have been used to develop and build these pieces of software. The compilers will determine which processor operations will be supported by the software, so if a job runs software from two different compilers conflicts, errors or unwanted behaviour may occur. &lt;br /&gt;
&lt;br /&gt;
Therefore, it is best to have jobs with software built from the same compiler. This is the purpose of the buckets, where all the software should be built with the same compiler.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
===Listing Modules===&lt;br /&gt;
&lt;br /&gt;
The commands that hereby follow will list the modules available to the user in increansing detail. &#039;&#039;&#039;overview&#039;&#039;&#039; provides a top level view of the software available without going into detail about the different versions available. It will only list the software and the number of versions. The &#039;&#039;&#039;avail&#039;&#039;&#039; command will list the different versions of the same software. Finally, &#039;&#039;&#039;spider&#039;&#039;&#039; will provide a verbose list with all the different versions and the description of each.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module overview&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module avail&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module spider&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Searching For Modules===&lt;br /&gt;
&lt;br /&gt;
The same commands used for listing modules can be used for searching, the only difference is that that the name of the module is passed as an argument. Like the listing in the section above, the commands provide different levels of verbosity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module overview &amp;lt;nameOfModule&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module avail &amp;lt;nameOfModule&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module spider &amp;lt;nameOfModule&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Searching For Keywords===&lt;br /&gt;
&lt;br /&gt;
As a more advanced search feature, one can search for keywords inside of modules. This is useful when searching for which modules contain a specific Python or R extension. There are bundle modules for both languages that contain a list of their extensions. Lmod will also search inside the description of the modules, which can be useful for discoverability.&lt;br /&gt;
&lt;br /&gt;
This feature can be used with the following command template: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module key &amp;lt;keyword&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To illustrate, say that one needs to find a module with the R packager &#039;&#039;&#039;terra&#039;&#039;&#039; installed. The first step would be to load one of the buckets, for instance 2023. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module load 2023&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, the next step would be to apply the key template above&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module key terra&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which yields the following results&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The following modules match your search criteria: &amp;quot;terra&amp;quot;&lt;br /&gt;
--------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
  R-bundle-CRAN: R-bundle-CRAN/2023.12-foss-2023a&lt;br /&gt;
    Bundle of R packages from CRAN&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------------------------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hence, one would need to load the module &#039;&#039;&#039;R-bundle-CRAN/2023.12-foss-2023a&#039;&#039;&#039; to have access to the &#039;&#039;&#039;terra&#039;&#039;&#039; package&lt;br /&gt;
&lt;br /&gt;
===Loading Modules===&lt;br /&gt;
&lt;br /&gt;
Modules are loaded through the following command template&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module load &amp;lt;moduleName&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The example below show how to load the python module from the 2023 bucket&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module load 2023&lt;br /&gt;
module load Python/3.11.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is good practice to specify the version of the module being loaded for consistency and reproducibility. &lt;br /&gt;
&lt;br /&gt;
If the version of the module is not specified, lmod will choose the default available version at the time and that may change.&lt;br /&gt;
&lt;br /&gt;
By specifying the version in your submit scripts, it transforms the script into additional documentation.&lt;br /&gt;
&lt;br /&gt;
When loading modules, the dependencies of that module will also be loaded with it.&lt;br /&gt;
&lt;br /&gt;
===List Loaded Modules===&lt;br /&gt;
&lt;br /&gt;
Loaded modules can be listed  with following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module list&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the example in the previous section, after loading the 2023 and the Python/3.11.3 modules (and its dependencies), one can this list the modules loaded&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user001@login201:~$ module list&lt;br /&gt;
&lt;br /&gt;
Currently Loaded Modules:&lt;br /&gt;
  1) slurm/24.05.1              (S)   5) binutils/2.40-GCCcore-12.3.0     9) Tcl/8.6.13-GCCcore-12.3.0     13) OpenSSL/1.1&lt;br /&gt;
  2) 2023                             6) bzip2/1.0.8-GCCcore-12.3.0      10) SQLite/3.42.0-GCCcore-12.3.0  14) Python/3.11.3-GCCcore-12.3.0&lt;br /&gt;
  3) GCCcore/12.3.0                   7) ncurses/6.4-GCCcore-12.3.0      11) XZ/5.4.2-GCCcore-12.3.0&lt;br /&gt;
  4) zlib/1.2.13-GCCcore-12.3.0       8) libreadline/8.2-GCCcore-12.3.0  12) libffi/3.4.4-GCCcore-12.3.0&lt;br /&gt;
&lt;br /&gt;
  Where:&lt;br /&gt;
   S:  Module is Sticky, requires --force to unload or purge&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we can see that aside from the slurm modules (which is loaded by default),  the 2023 module and the Python/3.11.3, 11 other dependencies are loaded with the Python/3.11.3 module&lt;br /&gt;
&lt;br /&gt;
===Removing Modules===&lt;br /&gt;
&lt;br /&gt;
Modules can be removed with the following template command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module unload &amp;lt;moduleName&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the example of the python module above, the module can be removed with the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module unload Python/3.11.3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will only unload the Python/3.11.3 module and not its dependencies. &lt;br /&gt;
&lt;br /&gt;
We can see this if we list the loaded modules again&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user001@login201:~$ module unload Python/3.11.3&lt;br /&gt;
user001@login201:~$ module list&lt;br /&gt;
&lt;br /&gt;
Currently Loaded Modules:&lt;br /&gt;
  1) slurm/24.05.1              (S)   5) binutils/2.40-GCCcore-12.3.0     9) Tcl/8.6.13-GCCcore-12.3.0     13) OpenSSL/1.1&lt;br /&gt;
  2) 2023                             6) bzip2/1.0.8-GCCcore-12.3.0      10) SQLite/3.42.0-GCCcore-12.3.0  14) Python/3.11.3-GCCcore-12.3.0&lt;br /&gt;
  3) GCCcore/12.3.0                   7) ncurses/6.4-GCCcore-12.3.0      11) XZ/5.4.2-GCCcore-12.3.0&lt;br /&gt;
  4) zlib/1.2.13-GCCcore-12.3.0       8) libreadline/8.2-GCCcore-12.3.0  12) libffi/3.4.4-GCCcore-12.3.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can completely clean the environment by using the purge command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module purge&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From our example, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;user001@login201:~$ module purge&lt;br /&gt;
The following modules were not unloaded:&lt;br /&gt;
  (Use &amp;quot;module --force purge&amp;quot; to unload all):&lt;br /&gt;
&lt;br /&gt;
  1) slurm/24.05.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The only remaining module is the slurm module with we have set as sticky. &lt;br /&gt;
&lt;br /&gt;
This command is useful to execute in job scripts since it clear the environment of unwanted software that may be loaded by mistake.&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Apptainer&amp;diff=2530</id>
		<title>Apptainer</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Apptainer&amp;diff=2530"/>
		<updated>2025-11-19T12:53:50Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: Update the location of the apptainer modules&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Apptainer is a container platform. It allows you to create and run containers that package up pieces of software in a way that is portable and reproducible. You can build a container using Apptainer on your laptop, and then run it on many of the largest HPC clusters in the world, local university or company clusters, a single server, in the cloud, or on a workstation down the hall. Your container is a single file, and you don’t have to worry about how to install all the software you need on each different operating system.&lt;br /&gt;
&lt;br /&gt;
Apptainer is a fork of singularity and, thus, also supports singularity commands and workflows.&lt;br /&gt;
&lt;br /&gt;
==Apptainer on Anunna==&lt;br /&gt;
&lt;br /&gt;
Since Apptainer is not dependent on specific compilers and toolchains, it is now place inside the &#039;&#039;&#039;utilities&#039;&#039;&#039; bucket.  Inside this bucket, there are two options:&lt;br /&gt;
&lt;br /&gt;
* Apptainer&lt;br /&gt;
* Apptainer-epel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The regular &#039;&#039;&#039;Apptainer&#039;&#039;&#039; module loads the version compiled in Anunna. This is more suitable to containers built with more recent operating systems. For most projects this will be enough. &lt;br /&gt;
&lt;br /&gt;
However, some projects still use some very old Linux versions and through errors related to missing versions of GLIBC when running in Anunna. That is where &#039;&#039;&#039;Apptainer-epel&#039;&#039;&#039; comes in, this is a package distributed by the Fedora Project EPEL (Extra Packages for Enterprise Linux) repositories. This package is built with a broad range of versions of GLIBC in mind, so will likely work with older images like ubuntu 22.04 or older. &lt;br /&gt;
&lt;br /&gt;
One can load apptainer by running the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module load utilities&lt;br /&gt;
module load Apptainer&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Initial Setup ====&lt;br /&gt;
Apptainer will cache SIF container images generated from remote sources, and any OCI/docker layers used to create them. The cache is created at &amp;lt;code&amp;gt;$HOME/.apptainer/cache&amp;lt;/code&amp;gt; by default. The location of the cache can be changed by setting the &amp;lt;code&amp;gt;APPTAINER_CACHEDIR&amp;lt;/code&amp;gt; environment variable.&lt;br /&gt;
&lt;br /&gt;
Since there is a limited amount of space available at &amp;lt;code&amp;gt;$HOME&amp;lt;/code&amp;gt;, the Apptainer cache can quickly fill your quota. So it is recommended that you set the variable &amp;lt;code&amp;gt;APPTAINER_CACHEDIR&amp;lt;/code&amp;gt; to a location ion lustre by edition your &amp;lt;code&amp;gt;$HOME/.bash_aliases&amp;lt;/code&amp;gt; file. An example is provided at [[Aliases and local variables]]&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Shared_folders&amp;diff=2523</id>
		<title>Shared folders</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Shared_folders&amp;diff=2523"/>
		<updated>2025-10-30T12:56:14Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: /* ACL shared directories on NFS folders */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Working with shared folders on Anunna =&lt;br /&gt;
&lt;br /&gt;
If you work in a group or team, it is sometimes useful to work within a shared space. Users can thus share inputs to their models and make their outputs also easily available to each other. This article explains how to do so within the Lustre file system and home or archive folder (NFS).&lt;br /&gt;
&lt;br /&gt;
There are two main methods available to you: Access Control List (ACL) access (that you can administer yourself), group access with AD rights or group access within Anunna (which are centrally administered).&lt;br /&gt;
&lt;br /&gt;
Below we will split out the options for each method.&lt;br /&gt;
&lt;br /&gt;
== ACL shared directories ==&lt;br /&gt;
=== ACL shared directories on Lustre ===&lt;br /&gt;
You may create a folder that can be accessed by yourself and someone else in the following manner:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /lustre/shared&lt;br /&gt;
mkdir shared_folder&lt;br /&gt;
chmod 700 shared_folder&lt;br /&gt;
user=$USER&lt;br /&gt;
setfacl -R -m u:${user}:rwx,d:u:${user}:rwx shared_folder&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, for each person who you want to have access to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user=username001&lt;br /&gt;
setfacl -R -m u:${user}:rwx,d:u:${user}:rwx shared_folder&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the command above grants read, write and execute access to &#039;&#039;&#039;username001&#039;&#039;&#039; , if you just want to grant read access just substitute &#039;&#039;&#039;rwx&#039;&#039;&#039; by &#039;&#039;&#039;r-x&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For groups, replace the &amp;quot;u&amp;quot; with &amp;quot;g&amp;quot;, like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;group=my_group&lt;br /&gt;
setfacl -R -m g:${group}:rwx,d:g:${group}:rwx shared_folder&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you only want to add read rights to the folder, remove the &amp;quot;w&amp;quot; above.&lt;br /&gt;
Do not remove the &amp;quot;x&amp;quot; (for execute), as folders need that set for access.&lt;br /&gt;
&lt;br /&gt;
To see the settings, use getfacl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
getfacl shared_folder&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adding users or groups later can be done using the same method, but it might be hard. &lt;br /&gt;
You may have trouble updating ACLs on files that aren&#039;t yours, and you cannot change ownership of files to yourself. &lt;br /&gt;
Each user with files in the folder will need to update their ACLs appropriately themselves, or you can contact your sysadmins to assist.&lt;br /&gt;
&lt;br /&gt;
=== ACL shared directories on NFS folders===&lt;br /&gt;
&lt;br /&gt;
{{Warning|Due to a missconfiguration, ACL permissions are currently disabled in our nfs shares, which includes the directories at /home and /shared. This will be addressed at the next downtime.}}&lt;br /&gt;
&lt;br /&gt;
If you want to share e.g. you home folder with another user, follow these steps:&lt;br /&gt;
&lt;br /&gt;
==== Set access rights on folder ====&lt;br /&gt;
&lt;br /&gt;
If you want to e.g. allow somebody (as identified by their user id) full read access on your homefolder, run this :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setfacl --recursive --modify u:haars001:r-x $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Group shared directories ==&lt;br /&gt;
&lt;br /&gt;
Users access the Anunna cluster with their WUR-wide (Active Directory) or Anunna only account. This means that all the membership information of the AD is also available on Anunna. To check of which groups your user is a member of, use the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;groups &amp;lt;username&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can result in a rather long list, reflecting permissions in the system. Within these groups you must then identify the one that is closer to match the team or group with which you wish to collaborate.&lt;br /&gt;
&lt;br /&gt;
For instance, if I wish to work together with colleagues at ISRIC, I can search within my groups an appropriate match:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;groups duque004 | grep isric&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In my case the group des-isric-users looked appropriate. Then next step is to confirm if the other users in my team are also members of the group.&lt;br /&gt;
&lt;br /&gt;
If a group isn&#039;t available (cooperation with people outside WUR), please ask the administrators for help, they can then set up a group for you.&lt;br /&gt;
&lt;br /&gt;
=== Creating a shared Lustre folder with correct permissions ===&lt;br /&gt;
&lt;br /&gt;
The Lustre file system is accessible in the &amp;lt;code&amp;gt;/lustre&amp;lt;/code&amp;gt; folder and then divided into the &amp;lt;code&amp;gt;/backup&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/nobackup&amp;lt;/code&amp;gt; sections (corresponding to the different usage plans). Inside each of these folders there is a sub-folder named &amp;lt;code&amp;gt;SHARED&amp;lt;/code&amp;gt; in which users are to create their own assets.&lt;br /&gt;
&lt;br /&gt;
You start by creating a folder in this space; it is probably better if it matches the name of your group or team, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir /lustre/nobackup/SHARED/myTeamWorkspace&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Or in alternative:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /lustre/nobackup/SHARED&lt;br /&gt;
&lt;br /&gt;
mkdir myTeamWorkspace&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting permissions ===&lt;br /&gt;
&lt;br /&gt;
Three basic steps are involved in stepping permissions correctly:&lt;br /&gt;
&lt;br /&gt;
1. Pass the ownership of the group to the team. In the example below it is applied recursively to all sub-folder and files that may exist:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;chgrp -R my-team-group myTeamWorkspace&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Concede read/write permissions to the group. This allows other members of the group to read and write in the shared folder. If you wish other team members to only read from the folder then remove the &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt; character from the &amp;lt;code&amp;gt;+rw&amp;lt;/code&amp;gt; bit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod -R g+rw myTeamWorkspace&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Set default ownership within the group. This guarantees that any new files or folders created within the shared folder are owned by default owned by your team group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod -R g+s myTeamWorkspace&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In case the contents of the shared are sensitive or private, and should be accessed by your team, you can block access from any other users with the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod -R o-rw myTeamWorkspace&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-permissions An Introduction to Linux Permissions]&lt;br /&gt;
&lt;br /&gt;
[https://www.linode.com/docs/tools-reference/linux-users-and-groups/ Linux Users and Groups]&lt;br /&gt;
&lt;br /&gt;
[https://www.digitalocean.com/community/tutorials/linux-permissions-basics-and-how-to-use-umask-on-a-vps#types-of-permissions Linux Permissions Basics and How to Use Umask on a VPS]&lt;br /&gt;
&lt;br /&gt;
[http://www.yolinux.com/TUTORIALS/LinuxTutorialManagingGroups.html Linux Tutorial - Managing Group Access on Linux and UNIX]&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Python&amp;diff=2522</id>
		<title>Python</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Python&amp;diff=2522"/>
		<updated>2025-10-23T15:56:43Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Python is a high-level, interpreted programming language that has gained widespread popularity for its readability, versatility, and user-friendly syntax. Created by Guido van Rossum and first released in 1991, Python was designed to emphasize code clarity and reduce the complexity often associated with other languages. Its straightforward, English-like syntax makes it a natural choice for beginners, while its power and flexibility continue to attract experienced developers in numerous industries.&lt;br /&gt;
&lt;br /&gt;
One of Python’s greatest strengths lies in its extensive standard library, which provides built-in modules and functions for tasks ranging from file manipulation to internet protocols. Additionally, a thriving open-source community has developed countless third-party libraries and frameworks, making Python suitable for everything from data analysis and machine learning to web development and automation. Popular libraries like NumPy, Pandas, and TensorFlow enable developers to handle massive datasets, train artificial intelligence models, and build sophisticated applications with relative ease.&lt;br /&gt;
&lt;br /&gt;
Anunna offers environment modules for a single version of python for each bucket. On top of the standard environment modules, bundle modules are available for more specific user cases. &lt;br /&gt;
&lt;br /&gt;
Users can also install their own Python distributions, like [https://mamba.readthedocs.io/en/latest/ Mamba]. While, the use of Anaconda is discouraged.&lt;br /&gt;
&lt;br /&gt;
== Modules ==&lt;br /&gt;
&lt;br /&gt;
Each module year bucket comes with a version of Python installed&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;2023&#039;&#039;&#039;: Python/3.11.3&lt;br /&gt;
* &#039;&#039;&#039;2024&#039;&#039;&#039;: Python/3.12.3&lt;br /&gt;
&lt;br /&gt;
Additionally, modules of bundles of python extensions are also installed&lt;br /&gt;
&lt;br /&gt;
* Python-bundle-PyPI&lt;br /&gt;
&lt;br /&gt;
== Mamba ==&lt;br /&gt;
&lt;br /&gt;
== Creating Custom Virtual Environments from Modules ==&lt;br /&gt;
&lt;br /&gt;
The HPC team is aware that users may need to build custom python environments for their jobs. These environments can be based off the python environment modules provided by Anunna.&lt;br /&gt;
&lt;br /&gt;
Python virtual environments are self-contained directories that house a specific Python installation and its associated packages, ensuring that one project’s dependencies don’t clash with another. They isolate your software requirements, letting the user manage different versions of libraries or modules in separate, discrete environments. This prevents version conflicts and keeps your system’s base Python environment clean. Tools like ‘venv’ and ‘virtualenv’ simplify creating and activating these spaces, making it straightforward to switch between multiple projects.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Load the module of the desired Python version&lt;br /&gt;
* Create a virtual environment folder&lt;br /&gt;
* Activate virtual environment&lt;br /&gt;
* Install desired packages with Pip&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Firstly, load the module of the desired python version. The example that hereby follows makes use of Python-3.12.3 available at the 2024 bucket. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module load 2024&lt;br /&gt;
module load Python/3.12.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the Python module is loaded, the environment can be created. The environment will be stored in a folder at the location of your choosing. It is not necessary to create the folder beforehand, though in this example it is assumed that the location &amp;lt;code&amp;gt;$MYBKP/PythonEnv&amp;lt;/code&amp;gt; already exists. Note that &amp;lt;code&amp;gt;$MYBKP&amp;lt;/code&amp;gt; refers to the lustre backup location specified at your &amp;lt;code&amp;gt;~/.bash_aliases&amp;lt;/code&amp;gt; file (see our entry on [[Aliases_and_local_variables| Aliases and local variables]])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python -m venv $MYBKP/PythonEnv/my_env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once created, the virtual environment needs to be activated in order to be used or modified.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source $MYBKP/PythonEnv/my_env/bin/activate&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the environment has been activated, you should see the name of the environment as a suffix of your prompt. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(my_env) user001@login200:$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While the virtual environment is active, you can use pip to install modules directly into your environment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pip install -U numpy pandas matplotlib datetime&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The installed modules are stored at $MYBKP/PythonEnv/my_env/lib/python3.12/site-packages/. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note&lt;br /&gt;
&lt;br /&gt;
== Creating Jupyter kernels from virtual environments ==&lt;br /&gt;
&lt;br /&gt;
It is often the case that users need to have a custom environment in jupyter. This can be facilitated with virtual environments. Assuming we use the virtual environment from the previous section, we just need to &lt;br /&gt;
&lt;br /&gt;
* load the required modules&lt;br /&gt;
* activate the environment&lt;br /&gt;
* install the &#039;&#039;&#039;ipython&#039;&#039;&#039; package&lt;br /&gt;
* generate the kernel&lt;br /&gt;
* Write a wrapper script&lt;br /&gt;
* Make the wrapper script executable&lt;br /&gt;
* Edit the kernel file&lt;br /&gt;
&lt;br /&gt;
First, load the required modules. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module load 2024&lt;br /&gt;
module load Python/3.12.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then activate the environment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source $myBKP/PythonEnv/my_env/bin/activate&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the ipykernel package&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pip install ipykernel&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run the command below to generate a kernel. Enter the desired name for the kernel with the flag &amp;lt;code&amp;gt;--name&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python -m ipykernel install --user --name=my_env_kernel_name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The kernel will be written to your home folder, more precisely &amp;lt;code&amp;gt;~/.local/share/jupyter/kernels/&amp;lt;/code&amp;gt;. &lt;br /&gt;
This location will be monitored by jupyter, which should display your custom kernel as one of the kernel options.&lt;br /&gt;
&lt;br /&gt;
As it is, the kernel will not work on jupyter because it will not be able to find the necessary modules to run it. A workaround is, then, to write a wrapper script to load the modules inside the kernel. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
&lt;br /&gt;
module reset&lt;br /&gt;
# modules to load&lt;br /&gt;
module load 2024&lt;br /&gt;
module load Python/3.12.3&lt;br /&gt;
# wrapper line&lt;br /&gt;
# exec &amp;lt;pathToVirtualEnvPythonExecutable&amp;gt; -m ipykernel_launcher &amp;quot;$@&amp;quot;&lt;br /&gt;
exec /lustre/scratch/&amp;lt;AFFILIATION&amp;gt;/&amp;lt;GROUP&amp;gt;/user001/PythonEnv/my_env/bin/bin/python -m ipykernel_launcher &amp;quot;$@&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The wrapper script uses &amp;lt;code&amp;gt;#!/bin/bash -l&amp;lt;/code&amp;gt;  as the interpreter of the script. The  &amp;lt;code&amp;gt;-l&amp;lt;/code&amp;gt;  flag tell bash to start as a login shell, which loads lmod by default. The modules are reset and the desired buckets and modules are loads.&lt;br /&gt;
&lt;br /&gt;
Finally, the wrapper script executes the module &#039;&#039;&#039;ipykernel_launcher&#039;&#039;&#039; from the virtual environment we just created. In this example, the code above is saved in &amp;lt;code&amp;gt;/home/WUR/user001/wrap.sh&amp;lt;/code&amp;gt; .  Make sure the wrapper script is executable.&lt;br /&gt;
&lt;br /&gt;
The last thing to do now is to modify the kernel.json file of the jupyter kernel created above. It should be located at &amp;lt;code&amp;gt;~/.local/share/jupyter/kernels/my_env_kernel_name/kernel.json&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
 &amp;quot;argv&amp;quot;: [&lt;br /&gt;
  &amp;quot;/home/WUR/user001/wrap.sh&amp;quot;,&lt;br /&gt;
  &amp;quot;-f&amp;quot;,&lt;br /&gt;
  &amp;quot;{connection_file}&amp;quot;&lt;br /&gt;
 ],&lt;br /&gt;
 &amp;quot;display_name&amp;quot;: &amp;quot;Python modTest&amp;quot;,&lt;br /&gt;
 &amp;quot;language&amp;quot;: &amp;quot;python&amp;quot;,&lt;br /&gt;
 &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
  &amp;quot;debugger&amp;quot;: true&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This kernel differs from a vanilla kernel file by specifying the location of the wrapper script as the first string passed to &#039;&#039;&#039;argv&#039;&#039;&#039;. Now that the modules are loaded, the kernel should be able to run on jupyter.&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Python&amp;diff=2521</id>
		<title>Python</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Python&amp;diff=2521"/>
		<updated>2025-10-22T13:14:48Z</updated>

		<summary type="html">&lt;p&gt;Honfi001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Python is a high-level, interpreted programming language that has gained widespread popularity for its readability, versatility, and user-friendly syntax. Created by Guido van Rossum and first released in 1991, Python was designed to emphasize code clarity and reduce the complexity often associated with other languages. Its straightforward, English-like syntax makes it a natural choice for beginners, while its power and flexibility continue to attract experienced developers in numerous industries.&lt;br /&gt;
&lt;br /&gt;
One of Python’s greatest strengths lies in its extensive standard library, which provides built-in modules and functions for tasks ranging from file manipulation to internet protocols. Additionally, a thriving open-source community has developed countless third-party libraries and frameworks, making Python suitable for everything from data analysis and machine learning to web development and automation. Popular libraries like NumPy, Pandas, and TensorFlow enable developers to handle massive datasets, train artificial intelligence models, and build sophisticated applications with relative ease.&lt;br /&gt;
&lt;br /&gt;
Anunna offers environment modules for a single version of python for each bucket. On top of the standard environment modules, bundle modules are available for more specific user cases. &lt;br /&gt;
&lt;br /&gt;
Users can also install their own Python distributions, like [https://mamba.readthedocs.io/en/latest/ Mamba]. While, the use of Anaconda is discouraged.&lt;br /&gt;
&lt;br /&gt;
== Modules ==&lt;br /&gt;
&lt;br /&gt;
Each module year bucket comes with a version of Python installed&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;2023&#039;&#039;&#039;: Python/3.11.3&lt;br /&gt;
* &#039;&#039;&#039;2024&#039;&#039;&#039;: Python/3.12.3&lt;br /&gt;
&lt;br /&gt;
Additionally, modules of bundles of python extensions are also installed&lt;br /&gt;
&lt;br /&gt;
* Python-bundle-PyPI&lt;br /&gt;
&lt;br /&gt;
== Mamba ==&lt;br /&gt;
&lt;br /&gt;
== Creating Custom Virtual Environments from Modules ==&lt;br /&gt;
&lt;br /&gt;
The HPC team is aware that users may need to build custom python environments for their jobs. These environments can be based off the python environment modules provided by Anunna.&lt;br /&gt;
&lt;br /&gt;
Python virtual environments are self-contained directories that house a specific Python installation and its associated packages, ensuring that one project’s dependencies don’t clash with another. They isolate your software requirements, letting the user manage different versions of libraries or modules in separate, discrete environments. This prevents version conflicts and keeps your system’s base Python environment clean. Tools like ‘venv’ and ‘virtualenv’ simplify creating and activating these spaces, making it straightforward to switch between multiple projects.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Load the module of the desired Python version&lt;br /&gt;
* Create a virtual environment folder&lt;br /&gt;
* Activate virtual environment&lt;br /&gt;
* Install desired packages with Pip&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Firstly, load the module of the desired python version. The example that hereby follows makes use of Python-3.12.3 available at the 2024 bucket. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module load 2024&lt;br /&gt;
module load Python/3.12.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the Python module is loaded, the environment can be created. The environment will be stored in a folder at the location of your choosing. It is not necessary to create the folder beforehand, though in this example it is assumed that the location &amp;lt;code&amp;gt;$MYBKP/PythonEnv&amp;lt;/code&amp;gt; already exists. Note that &amp;lt;code&amp;gt;$MYBKP&amp;lt;/code&amp;gt; refers to the lustre backup location specified at your &amp;lt;code&amp;gt;~/.bash_aliases&amp;lt;/code&amp;gt; file (see our entry on [[Aliases_and_local_variables| Aliases and local variables]])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python -m venv $MYBKP/PythonEnv/my_env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once created, the virtual environment needs to be activated in order to be used or modified.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source $MYBKP/PythonEnv/my_env/bin/activate&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the environment has been activated, you should see the name of the environment as a suffix of your prompt. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(my_env) user001@login200:$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While the virtual environment is active, you can use pip to install modules directly into your environment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pip install -U numpy pandas matplotlib datetime&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The installed modules are stored at $MYBKP/PythonEnv/my_env/lib/python3.12/site-packages/. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note&lt;br /&gt;
&lt;br /&gt;
== Creating Jupyter kernels from virtual environments ==&lt;br /&gt;
&lt;br /&gt;
It is often the case that users need to have a custom environment in jupyter. This can be facilitated with virtual environments. Assuming we use the virtual environment from the previous section, we just need to &lt;br /&gt;
&lt;br /&gt;
* load the required modules&lt;br /&gt;
* activate the environment&lt;br /&gt;
* install the &#039;&#039;&#039;ipython&#039;&#039;&#039; package&lt;br /&gt;
* generate the kernel&lt;br /&gt;
* Write a wrapper script&lt;br /&gt;
* Make the wrapper script executable&lt;br /&gt;
* Edit the kernel file&lt;br /&gt;
&lt;br /&gt;
First, load the required modules. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module load 2024&lt;br /&gt;
module load Python/3.12.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then activate the environment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source $myBKP/PythonEnv/my_env/bin/activate&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install the ipykernel package&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pip install ipykernel&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run the command below to generate a kernel. Enter the desired name for the kernel with the flag &amp;lt;code&amp;gt;--name&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python -m ipykernel install --user --name=my_env_kernel_name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The kernel will be written to your home folder, more precisely &amp;lt;code&amp;gt;~/.local/share/jupyter/kernels/&amp;lt;/code&amp;gt;. &lt;br /&gt;
This location will be monitored by jupyter, which should display your custom kernel as one of the kernel options.&lt;br /&gt;
&lt;br /&gt;
As it is, the kernel will not work on jupyter because it will not be able to find the necessary modules to run it. A workaround is, then, to write a wrapper script to load the modules inside the kernel. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
&lt;br /&gt;
module reset&lt;br /&gt;
# modules to load&lt;br /&gt;
module load 2024&lt;br /&gt;
module load Python/3.12.3&lt;br /&gt;
# wrapper line&lt;br /&gt;
# exec &amp;lt;pathToVirtualEnvPythonExecutable&amp;gt; -m ipykernel_launcher &amp;quot;$@&amp;quot;&lt;br /&gt;
exec /lustre/scratch/&amp;lt;AFFILIATION&amp;gt;/&amp;lt;GROUP&amp;gt;/user001/PythonEnv/my_env/bin/bin/python -m ipykernel_launcher &amp;quot;$@&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The code above initializes lmod by sourcing &amp;lt;code&amp;gt;/etc/bash.bashrc&amp;lt;/code&amp;gt;, then it loaded the modules required by the environment. Finally, it executes ipykernel_launcher from the virtual environment created. In this example, the code above is saved in &amp;lt;code&amp;gt;/home/WUR/user001/wrap.sh&amp;lt;/code&amp;gt; .  Make sure the wrapper script is executable.&lt;br /&gt;
&lt;br /&gt;
The last thing to do now is to modify the kernel.json file of the jupyter kernel created above. It should be located at &amp;lt;code&amp;gt;~/.local/share/jupyter/kernels/my_env_kernel_name/kernel.json&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
 &amp;quot;argv&amp;quot;: [&lt;br /&gt;
  &amp;quot;/home/WUR/user001/wrap.sh&amp;quot;,&lt;br /&gt;
  &amp;quot;-f&amp;quot;,&lt;br /&gt;
  &amp;quot;{connection_file}&amp;quot;&lt;br /&gt;
 ],&lt;br /&gt;
 &amp;quot;display_name&amp;quot;: &amp;quot;Python modTest&amp;quot;,&lt;br /&gt;
 &amp;quot;language&amp;quot;: &amp;quot;python&amp;quot;,&lt;br /&gt;
 &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
  &amp;quot;debugger&amp;quot;: true&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This kernel differs from a vanilla kernel file by specifying the location of the wrapper script as the first string passed to &#039;&#039;&#039;argv&#039;&#039;&#039;. Now that the modules are loaded, the kernel should be able to run on jupyter.&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
</feed>