qiime2 / q2cwl

Prototype interface for automatically generating CWL tools from QIIME 2 actions
BSD 3-Clause "New" or "Revised" License
8 stars 7 forks source link

Set up a docker container for q2cwl #3

Open ebolyen opened 6 years ago

ebolyen commented 6 years ago

References Should be able to adapt the work in https://github.com/qiime2/vm-playbooks for this.

ebolyen commented 5 years ago

I need to work out how to handle plugins in this context, as we are definitely accruing quite a few (https://library.qiime2.org/plugins).

I think one approach might be to have the q2cwl templater accept a dockerfile or image name on dockerhub which it will bake into the resources section.

I think we'll need a minimal base-image which provides the framework and q2cwl runner which also sets up these env vars so that the tool doesn't need to define them anymore:

    envDef:
      LC_ALL: en_US.utf8
      MPLBACKEND: Agg

Is it possible to check the inheritance chain of a docker image?

mr-c commented 5 years ago

Is it possible to check the inheritance chain of a docker image?

@ebolyen Yes, using docker inspect or other methods

ebolyen commented 5 years ago

Perfect!

inutano commented 5 years ago

Hi @ebolyen, this tool is really cool! I'd like to try your q2cwl with the Docker option but couldn't find the image qiime2/q2cwl-core. Any updates for this issue?

ebolyen commented 5 years ago

Hi @inutano! Sorry for the delay on my part, I was on vacation last week. We do not really have any such Docker image as I wasn't able to work out how to "integrate" arbitrary plugins without basically writing a custom Dockerfile each time. e.g. there isn't a way to "merge" images (at least not at the time I looked). Other projects "solve" this by generating every possible permutation, which I wasn't super excited about.

This restriction does make sense, since "merging" would more likely than not result in an incompatible user-space inside the docker container, but it definitely means we don't have an obvious way forward.

What I would recommend, is crafting a docker image you control with the plugins you need. The only real extra requirement is that q2cwl is also installed within the docker image, which is easy to do.

The q2cwl template docker command lets you specify exactly where the image comes from, so it should all just "work", but please let me know if you run into issues!

inutano commented 5 years ago

I see. I only needed the basic qiime2 actions so I've used qiime2/core as the base image and it's working fine! Thanks again, this is really cool. I could avoid writing a whole bunch of CWL definitions!