Skip to content

Conversation

@alaindomissy
Copy link
Contributor

Replacing the initial vagrant box from "ubuntu/trusty64" with "ubuntu/xenial64" was a great move :

  • xenial is the latest ubuntu long term support release,
  • also this avoids an issue which is specific to older versions of ubuntu : when running multiprocessing python inside the image the OS needs to create temporary files in /run/shm and /run/lock and this does not work unless the /etc/singularity/singularity.conf is modified with an additional line: "bind path = /run" )
    However when testing more, I found that box the ubuntu/xenial64 does not have a system python2 installed, just a python3, Because of that , several steps fail unless python2 is installed: some python scripts have a she-bang line like this:
    #!/usr/bin/env python and in absence of python2 , the python command is not found. So this is another hassle which would need to be documented in the instructions
    The solution I found is to use an alternative ubuntu1604 box from the bento project : http://chef.github.io/bento/ Bento is an impressive project and their vagrant boxes are well made and well regarded. https://atlas.hashicorp.com/bento

Replacing the initial vagrant box from "ubuntu/trusty64" with "ubuntu/xenial64" was a great move :
-  xenial is the latest ubuntu long term support release, 
-  also  this avoids an issue which is specific to older versions of ubuntu : when running multiprocessing python inside the image the OS needs to create temporary files in /run/shm and /run/lock and this does not work unless the /etc/singularity/singularity.conf is modified with an additional  line:  "bind path = /run" )
However when testing more, I found that box the ubuntu/xenial64 does not have a system python2 installed, just a python3,  Because of that , several steps fail unless python2 is installed:  some python scripts have a she-bang line like this:
#!/usr/bin/env python and in absence of python2 , the python command is not found. So this is another hassle which would need to be documented in the instructions 
The solution I found is to use an alternative ubuntu1604 box from the bento project : http://chef.github.io/bento/ Bento is an impressive project and their vagrant boxes are well made and well regarded. https://atlas.hashicorp.com/bento
# generate a template Vagrantfile for "bento/ubuntu-16.04"
mkdir singularity-vm
cd singularity-vm
vagrant init ubuntu/xenial64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this guy be bento/ubuntu-16.04 too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @alaindomissy let me know if you want to fix this - I'd be happy to do a quick PR to change it on my end, since it's pretty small. Let me know!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I fixed it. Thanks

@vsoch
Copy link
Member

vsoch commented May 26, 2017

I'm a huge fan of hasicorp! I know almost nothing about them, but I especially like Packer, Vagrant, and some of the other tools they have created.

@alaindomissy
Copy link
Contributor Author

There is a docker Packer builder : https://www.packer.io/docs/builders/docker.html
Would a singularity Packer builder be feasible / a good idea ? :-)

@vsoch vsoch merged commit 5af531c into singularityware:docs/2.3 May 27, 2017
@vsoch
Copy link
Member

vsoch commented May 27, 2017

yes, definitely! I'll take a look at what constitutes a builder. I've been using packer for a custom deployment of a builder to google cloud, but we could equally use to make singularity locally. Thanks for testing and fixing the mac doc! Without Mac, I am badly in need of this help :)

@alaindomissy
Copy link
Contributor Author

alaindomissy commented May 27, 2017

My pleasure. Did you notice my comment in slack : I made a Vagrant Box with has singularity pre-installed
https://atlas.hashicorp.com/alaindomissy/boxes/singularity-2.2.99
This can simplify the installation procedure for mac users :

1) first install vagrant
             https://www.vagrantup.com/docs/installation
1.5)  if on windows, also install git, as this is the easiest way to have ssh (which we need)
2) then create a new directory in your home and navigate to it: (your syntax may vary)
             mkdir -p /Users/me/testing-singularity-vagrant-box
              cd  /Users/me/testing-singularity-vagrant-box
3) then run these 2 commands to download and start the VM:
            vagrant init alaindomissy/singularity-2.2.99
            vagrant up --provider virtualbox
4) to enter the VM run:
            vagrant ssh
5) download your favorite container from singularity-hub:
             singularity pull shub://vsoch/hello-world:master
6) Play with it:
             chmod +x bunchofnumbers.img
             ./bunchofnumbers.img

Also it should also work for windows users
( there are no instructions for windows at the moment at : http://singularity.lbl.gov/install-windows )

I'd be happy to rename, relocate, document etc... if that could be useful for the Singularity project.....

@vsoch
Copy link
Member

vsoch commented May 27, 2017

I just tested - it works great! (sorry for delay, had a few issues with my kernel). How does it work to create a box on Atlas? Is it a service you need to pay for? I think this would be fantastic to provide for Singularity - especially for version 2.3 (if you saw is being released next Wednesday!) If this is something that we are able to make a singularityware account to serve the image from, I think that would be fantastic. If that's not possible, and you don't mind maintaining, then we can definitely use this uri. What do you think?

@alaindomissy
Copy link
Contributor Author

alaindomissy commented May 27, 2017 via email

@alaindomissy
Copy link
Contributor Author

I renamed my account to singularityware, so the link to the vagrantbox is now:
https://atlas.hashicorp.com/singularityware/boxes/singularity-2.2.99/
and people can download it with:
vagrant init singularityware/singularity-2.2.99
Is that ok ?
I see that I can add you to the singularityware account if you create a username on https://atlas.hashicorp.com/vagrant
Let me know if you prefer setting this up another way

@vsoch
Copy link
Member

vsoch commented May 27, 2017

Hey @alaindomissy ! Apologies for the delay, I went for a run this morning :) I just made an account (or I believe it's called "organization") called vanessa, I'm not sure if this link will work for you but this seems to be one of it's bases:

https://atlas.hashicorp.com/settings/organizations/vanessa

Can you find me on there and add to Singularityware? Then we can add this to the docs! This was a really great idea - it's really much easier using vagrant with already to go images than coming up with a new one on the fly.

@vsoch
Copy link
Member

vsoch commented May 27, 2017

oh! And @alaindomissy if you want to point me at the container you are having trouble building on singularity hub, I'd be glad to look into it. If it's an issue of using the older singularity, then that will be resolved when I update the builders on Wednesday. If not, I'll help you figure it out sooner. For future / any and all help that you need with Singularity Hub, please post on the repo here! https://github.com/singularityhub/singularityhub.github.io/issues

@alaindomissy
Copy link
Contributor Author

Hi @vsoch , your vanessa hashicorp account is now added to the owners team for the singularityware organisation on atlas :-)
I posted this singularity-hub github issue regarding my troublesome singularity container building
Thanks!

@vsoch
Copy link
Member

vsoch commented May 28, 2017

awesome! I just added the singularityware vagrant box to the docs page, take a look and let me know if everything looks ok: https://github.com/singularityware/singularityware.github.io/blob/docs/2.3/pages/docs/install/install-mac.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants