Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add (incomplete) singularity interface #1805

Conversation

glennhickey
Copy link
Contributor

I said back in #1768 that I'd PR toil-vg's singularity module into Toil, so here it is. It seems to run okay for our purposes of calling command line tools in containers, except that the cache used to run Docker images on the fly gets easily overwhelmed. This is worked around by converting the images a priori (we could probably automate this if necessary). If Singularity ever made the cache size tunable, that'd probably work too.

There's still a lot of work to make this a drop-in replacement for docker.py:

  • There's no interface to inspect or stop running containers.
  • The test won't run on Jenkins because singularity's not on the jenkins slave image. (even then, I'm not sure since I can't get any Toil tests to run locally from the command line any more)
  • I wouldn't be surprised if there are nesting issues that would arise when running these within the docker appliance (or vice versa)

I think would also require some thought for an abstract container interface. In toil-vg we wrap everything (https://github.com/vgteam/toil-vg/blob/master/src/toil_vg/vg_common.py#L87-L244) so it's easy to flip between docker/singularity/no-container. I think something similar is needed in Toil to make this useful. On a related note, singularity.py shares about 99% of its code with docker.py, so there may be room to refactor that a bit better too.

@ps-account
Copy link

As far as abstract container interface is concerned, maybe at one time it could be Open-Container compatible. ( https://blog.docker.com/2017/07/demystifying-open-container-initiative-oci-specifications/ ) - though this is not of very high functional impact to e.g. Singularity ( https://twitter.com/gmkurtzer/status/887705065573687296 )

@jessebrennan
Copy link
Contributor

In toil-vg we wrap everything (https://github.com/vgteam/toil-vg/blob/master/src/toil_vg/vg_common.py#L87-L244) so it's easy to flip between docker/singularity/no-container. I think something similar is needed in Toil to make this useful.

@glennhickey, is there a reason not to just add this class to Toil as well in this PR? I suppose it will need documentation, etc. however.

@glennhickey
Copy link
Contributor Author

glennhickey commented Aug 17, 2017 via email

@DailyDreaming
Copy link
Member

DailyDreaming commented Jun 20, 2018

Closing this due to:

  • 1. Toil is likely moving to github.com/DataBiosphere tomorrow and we're attempting to clean up PRs.
  • 2. This has sat here for nearly a year.
  • 3. This needs more work and testing.
  • 4. https://github.com/leukgen/toil_container

@ghost ghost removed the in progress label Jun 20, 2018
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.

None yet

4 participants