This recipe demonstrates how to run Singularity on your Windows computer via Vagrant and Ubuntu. This recipe may take anywhere from 5-20 minutes to complete.


First, install the following software:

Singularityware Vagrant Box

We are maintaining a set of Vagrant Boxes via Vagrant Cloud, one of Hashicorp many tools that likely you’ve used and haven’t known it. The current stable version of Singularity is available here:

For other versions of Singularity see our Vagrant Cloud repository

Run GitBash. The default home directory will be C:\Users\your_username

mkdir singularity-2.4
cd singularity-2.4

Note that if you had installed a previous version of the vm (and are using the same folder), you must destroy it first. In our example we create a new folder. To destroy a previous vm:

vagrant destroy

Then issue the following commands to bring up the Virtual Machine:

vagrant init singularityware/singularity-2.4
vagrant up
vagrant ssh

You are then ready to go with Singularity 2.4!

vagrant@vagrant:~$ which singularity
vagrant@vagrant:~$ singularity --version

vagrant@vagrant:~$ sudo singularity build growl-llo-world.simg shub://vsoch/hello-world
Cache folder set to /root/.singularity/shub
Progress |===================================| 100.0% 
Building from local image: /root/.singularity/shub/vsoch-hello-world-master.simg
Building Singularity image...
Singularity container built: growl-llo-world.simg
Cleaning up...
vagrant@vagrant:~$ ./growl-llo-world.simg

Note that when you do vagrant up you can also select the provider, if you use vagrant for multiple providers. For example:

vagrant up --provider virtualbox

although this isn’t entirely necessary if you only have it configured for virtualbox.