Singularity Container
Singularity is a container platform suitable for HPC environments, similar to Docker, designed to implement OS virtualization. You can create a container image that includes the Linux distribution, compiler, and libraries suitable for your working environment, and then run the container to execute your application.


※ Virtual machines have a structure where applications run through a hypervisor and guest OS, whereas containers are closer to the physical hardware and share the host OS rather than using a separate guest OS, resulting in lower overhead. The use of containers in cloud services has been increasing recently
A. Build a container image
1. Load the Singularity Module or Set the Path
2. local build
To build a container image locally on the Nurion system's login node, you must first apply for the use of fakeroot by submitting a request through the KISTI website > Technical Support > Consultation Request with the following details.
System Name : Nurion
User ID : a000abc
Request : Singularity fakeroot usage setting
3. Remote build
※ To use the remote build service provided by Sylabs Cloud (https://cloud.sylabs.io), an access token needs to be generated and registered on the Nurion system [Reference 1].
※ Additionally, the creation and management of Singularity container images can be done via a web browser by accessing Sylabs Cloud [Reference 2].
4. Importing/Exporting Container Images
※ To export (upload) an image to Sylabs Cloud (https://cloud.sylabs.io), you must generate an access token and register it on Nurion [Reference 1]
C. Running User Programs in a Singularity Container
1. Load the Singularity module or set the path
2. Command to run a program in a Singularity container
3. How to Run a Container via the Scheduler (PBS)
1) Write a job script to execute the task in batch mode
Run command : qsub<job script file>
※ For detailed instructions on using the scheduler (PBS), refer to the Nurion Guide - Executing Jobs via Scheduler (PBS).
2) Example of a Job Script File
Serial job
* Run command : qsub<job script file>
Serial job
* Run command: mpirun singularity run <container> [user program execution command]
※ Example of using 2 nodes with 64 tasks per node (total of 128 MPI processes)
3) Executing interactive jobs on compute nodes allocated by the scheduler
Example of running a parallel program (OpenMPI)
Example of running a TensorFlow program
※ Example Singularity image file location: /apps/applications/tensorflow/1.12.0/tensorflow-1.12.0-py3.simg
※ Example convolutional.py file location: /apps/applications/tensorflow/1.12.0/examples/convolutional.py
D. References
[Reference 1] Generating a Sylabs Cloud access token and registering on Nurion




[Reference 2] Building a Singularity container image using a remote builder via a web browser


※ Includes a list of images remotely built with singularity commands in Nurion
Last updated