Building Singularity images in Windows

Singularity WILL NOT work inside the Windows 10 Subsystem for Linux. This is due to the WSL not supporting features that singularity requires such as loop devices and other filesystem access types. All windows users MUST use Virtualbox and Vagrant to create singularity images.



 

Install Prerequisites

Download and Install Virtualbox
https://www.virtualbox.org/

 

Download and Install Vagrant
https://www.vagrantup.com/


Start up your vagrant image

 

Start a powershell session from the start menu

you may check for newer versions of the vagrant singularity image at https://app.vagrantup.com/boxes/search?utf8=%E2%9C%93&sort=downloads&provider=&q=singularity

 

The underlying OS such as Ubuntu or CentOS, as well as OS version do not matter. That is the beauty of containers!

Replace “sylabs/singularity-3.2-ubuntu-bionic64” with the version of your choice

 

In the powershell window run

 

vagrant init sylabs/singularity-3.2-ubuntu-bionic64

Once that completes run

 

vagrant up

 

The first time “vagrant up” runs it may take some time as it will need to download and configure the image.

Because it needs to download information you will need a connection to the internet. Amount of data downloaded is generally less than 1GB depending on the image being used

 

Last step before you can create singularity containers

 

vagrant ssh sudo su <singularity commands here>

 

 

Creating your Singularity image

 

From here, build your singularity image

Copy file from Vagrant to your windows system

 

Since you built the image as root, you will probably need to change ownership.

 

Take note of the filename and path

 

Type “exit” until you’re back at the windows prompt

 

Get the port from Vagrant

 

In the command below, make sure the number after “-P” match the one to the left of “(host)”

Make sure the path and filename in the scp command match what you noted earlier

If it asks for a password as in this example, the password is “vagrant”

 

Your Singularity image is now stored on your PC and can be transferred to the supercomputer

Filter by label

There are no items with the selected labels at this time.