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 support for Singularity InteractiveTools/Environments #10012

Open
mshamash opened this issue Jul 18, 2020 · 3 comments
Open

Add support for Singularity InteractiveTools/Environments #10012

mshamash opened this issue Jul 18, 2020 · 3 comments

Comments

@mshamash
Copy link

Many HPC clusters do not support Docker and instead offer Singularity. As such, it's currently impossible to use any of the InteractiveTools / Interactive Environments on instances where Galaxy is running on an HPC node.

Are there any plans to add support for Singularity containers in the future?

@jmchilton
Copy link
Member

While we would love to see this in Galaxy, it is not currently on our roadmap. I think the abstractions inside of Galaxy would make it possible as long as Singularity has a clean way to do the port mapping. Last we looked at it - that didn't seem to be possible but perhaps it is now - https://sylabs.io/guides/3.0/user-guide/networking.html#network-virtualization.

@pcm32
Copy link
Member

pcm32 commented Jul 16, 2021

You currently can do things like portmap, as in:

$ sudo singularity instance start --writable-tmpfs \
    --net --network-args "portmap=8080:80/tcp" docker://nginx web2

would this be sufficient @jmchilton ? Could you tells us which would be the entry points in the galaxy codebase where such support would need to be added to attempt a first implementation? I was looking around in the code and besides the interactive tools manager, I couldn't find anything that showed the action of sending the interactive tool to run on docker (to understand how to add support for singularity).

Or is it that now it is possible to run interactive tools on a remote k8s cluster?

Running interactive tools on singularity would facilitate things on our HPC setups.

@mvdbeek
Copy link
Member

mvdbeek commented Jul 22, 2021

@pcm32 Check out the original PR, #7494, in particular you would need to add the equivalent changes to build_singularity_run_command https://github.com/mvdbeek/galaxy/blob/c052ee503426ab40e2f7d0adc09fe3ad8f66d6e8/lib/galaxy/tool_util/deps/singularity_util.py#L32 that would consume guest_ports and container_name. You then need to adjust lib/galaxy_ext/container_monitor/monitor.py to write out the port text in container_runtime.json.

I think that might be most of what you need to do, but the logic relies on opening a random free port on the host, not sure if singularity can do this ? If not you would need to wrap the singularity command with equivalent logic.

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

No branches or pull requests

5 participants