/
Singularity Container Composer(User Guide)

Singularity Container Composer(User Guide)

The Singularity Container Composer hosted at https://containercomposer.ccs.uky.edu is a tool designed to simplify and streamline the management of Singularity containers, particularly in High-Performance Computing environments. It allows users to efficiently build, configure, and orchestrate their Singularity-based workflows. The GUI makes it easy for users to search the software and add them to the Singularity definition files and build custom Singularity containers with clicks.

image-20250204-193340.png
Singularity Container Composer Main Page

How to use the Singularity Container Composer

Step1: Sign Up and Login

At the moment, the tool uses an independent account management system(not related to linkblue id or cilogon id). Users need to sign up their accounts to continue. In the future, we may integrate this part with UK LDAP or CILogon.

Users need accounts to use this tool. First time users should click the “Sign Up“ button on the top right of the main page which will take them to the sign up page. Then they need to fill in the form with the username, email and password. Please read and agree to the privacy policy and check the checkbox. Once all the fields are filled in correctly, click the green “Sign Up“ button at the bottom of the page.

image-20250204-194806.png
Singularity Container Composer Sign Up Page

Once the admin approves the account, the user will receive an email

Note the sender email is not finalized for now. You should expect emails from containercomposer.ccs.uky.edu

Then users can click the link in the email to go to the home page and then click the “Login“ button the top right corner.

After users click the “Login“ button, they will be redirected to the GUI and till now the preparations/prerequisites are all met.

 

Step2: Use the GUI to Create Custom Singularity Containers

Users will see the page above after they have logged in. In general, the page can be divided into 3 parts.

(1)On the left side is the workflow(Step 1 to Step 4) to build a custom Singularity container.

(2)On the right side is the real-time Singularity definition file. The displayed file is updated when the user clicks the GUI elements on the left side.

(3)On the top right is the user profile dropdown. User can click the icon on the right side of “Welcome“ and see it, which allows the user to see their Singularity Container build requests (the View My Requests button) or log out(the Log Out button).

Workflow:

Users are expected to follow the workflow to build custom Singularity Containers via the GUI(Step1 to Step4) on the left side. It is a step-by-step process and the steps cannot be jumped. For example, if you have not finished Step1 but go to Step2, an error message will be popped up.

Step1: Select Base Image

We are using docker images to build Singularity containers and this is only one of the approaches. If you are adept in creating Singularity definition files, you can jump to Step4 and submit your custom Singularity definition files to build containers.

We provide different base images for different Linux distributions (Debian based os such as Ubuntu and RHEL based os such as RockyLinux) and architectures(Linux x86_64 and Linux arm64). Users can select the base image based on what Linux distribution they like and which architecture will the container be running on.

Note: For LCC, MCC, and ECC, the clusters all have Linux x86_64 architecture so users can pick either one of the first two options. Currently, building Singularity containers using ARM64 base images(the last two options) is under development since they have to be built on a ARM64 VM.

 

After user selects any option in the dropdown menu, the Singularity definition file on the right side will be updated accordingly. The changes are highlighted in the same color.

Step2: Add System-level Software or Environment Variables

After the base image is selected, users can go to Step2 to add system level software or add environment variables.

After users click the “Add system-level software“ button, they will see a new GUI popped up as above. By default, there are several commonly used utility software added in the box. Users can insert more in the box(separated by space) and click the “Confirm“ button. After the button is clicked, the GUI will become non-editable and the definition file on the right will be updated.

Note: Please at least keep “wget“ and “git“ since they will be used later.

Sometimes, you may also want to add environment variables. The button “Add environment variables“ is designed for this purpose.

The definition file will also be updated with the input environment variables after the “Confirmed” button is clicked.

Step3: Add Your Software

Users have different options here (1) Add software from Conda (2) Add software from other sources(URLs). Note: you can only pick one type per request. If you click “Add software from Conda“ and then click “Add software from other sources“ or vice versa, the GUI will be override.

Add Software from Conda

After clicking the button “Add software from Conda“, users will be asked to input an arbitrary Conda Environment name.

If we input a name such as myenvironment, we will see:

There are something to note here. First on the left side, the GUI has changed. Currently we just have a Conda environment without any software installed. So that’s why the “Added Software“ section is None for the Conda environment “myenvironment“.

At the same time, on the right side the definition file is updated. The %environment section is added to configure miniconda3. In the %post section, Miniconda3 is installed and the Conda environment “myenvironment“(the name we input) is created. The %apprun section is used to activate this environment when we run the container.

Then we can start

 

Center for Computational Sciences