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:
- install Git for Windows
- install VirtualBox for Windows
- install Vagrant for Windows
- install Vagrant Manager for Windows
Singularityware Vagrant Box
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:
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 /usr/local/bin/singularity vagrant@vagrant:~$ singularity --version 2.4-dist 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 RaawwWWWWWRRRR!!
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.