[GSoC2020][Bonding period] Troubleshooting for Singularity Hub

[Updated] 14/05/2020 PR #6 is merged.

Singularity Hub is an online hub for building and storing Singularity containers. We can easily build an image by connecting to the GitHub directory and proving a Recipe file. The build is automatically triggered if there is a push in GitHub.


Initial Recipe is not building after connecting the GitHub directory to Singularity Hub. However, I was following the exact steps described in the documentation.

I created a first Singularity recipe in the directory, then connected to the Singularity Hub. Ideally, this would build an image with the tag: lastest. However, the Singularity file didn’t trigger a build. Then I created a new Singularity.test. After pushing a new commit, a new image with the tag: test was created. Still, the initial Recipe Singularity was not taken into account.

Two Singularity Recipe files

But only one successful build with tag: test.


I was wondering why the initial Recipe is not taken into account. So I checked the default setting of Singularity Hub. The build is configured in the Automated Build mode. So I read the documentation of this mode, to see the rules to trigger a build.

This is how the Automated Build mode works:

After establishing the connection with the GitHub directory, they will filter the new commits since the last push. This filtering allows them to select the modified file’s name matches the pattern Singularity or Singularity.<tag>, then it will be taken into account. After that, the selected Recipes go through further analysis to determine whether a new image should be built or replace the older one.

Note the this selection process only takes place after the connection being settled. So the intial Recipe file will not be considered unless it is modified so that it can be listed in the commit history.

That means the recommended steps in the documentation is partially wrong. Partially because this is not a fatal problem. But it would indeed cause some trouble for a newbie like me to figure out what is going on.


In my case, a simple modification of the Singularity file will then trigger a successful build in the Singularity Hub.

Two image are built, with the initial one having the lastest tag.

For the best practice, it would be better to establish a connection with Singularity before initializing any Recipe.

To help other future students avoid this problem, I opened an issue in Singularity Hub. With the help of maintainers, I opened then a new PR to correct this error in the documentation. Link to the PR: #6




Leave a Reply

Your email address will not be published. Required fields are marked *