ohsu-comp-bio / funnel

Funnel is a toolkit for distributed task execution via a simple, standard API.
https://ohsu-comp-bio.github.io/funnel
MIT License
121 stars 32 forks source link

worker: Configurable executor backends #548

Open buchanae opened 6 years ago

buchanae commented 6 years ago

We have had a few use cases and requests for different, non-docker executor backends:

We've already discussed how we might support this, including having a configurable template string.

adamstruck commented 6 years ago

Funnel can now support anything that implements the docker CLI. Funnel uses exec to make calls to whatever docker is in your path so to use something like udocker just wrap it in a script called docker and put it in your PATH.

kfox1111 commented 5 years ago

Looking to do the same. Will look into a shell wrapper for now. Does anyone have a singularity wrapper already and willing to share? :)

illusional commented 4 years ago

Hey @kfox1111, did you have any luck with Singularity? We're considering Rootless Docker as a method to get around running containers in a protected environment.

kfox1111 commented 4 years ago

I have not gotten a chance to look at funnel further. But in general, Singularity is working pretty well on our HPC clusters. Recently I've started using podman/buildah on my centos8 boxes and that too is working pretty well for rootless containers. Centos8 comes out of the box with all the functionality for rootless podman preconfigured. I believe podman is docker cli compatible enough aliasing podman=docker might work for funnel. HPC systems tend to move slower though so singlularity support would still be very useful.

adamstruck commented 4 years ago

@illusional I alias docker to https://github.com/indigo-dc/udocker on our internal slurm HPC cluster. Podman (https://github.com/containers/libpod) looks like another promising option, but I have not tested it myself.

elenimath commented 3 years ago

@adamstruck would it be possible to provide the wrapper script you are using? I tried wrapping both udocker and singularity as docker but in both cases when running Funnel in our HPC I get an Exec error (unknown flag: --read-only)

adamstruck commented 3 years ago

@elenimath the command is end up looking something like: docker run --rm -i --read-only -w [workdir] -v [bindings] [imageName] [cmd].

https://github.com/ohsu-comp-bio/funnel/blob/master/worker/docker.go#L73

kfox1111 commented 3 years ago

Podman takes those same arguments and works in rootless mode. Making the command executed configurable so that s/docker/podman/ can be ran would be interesting.