question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

execute miniWDL in a Docker container

See original GitHub issue

Hello,

I’d like to run miniWDL itself in a Docker container.

This doesn’t work as Docker cannot bind the tmp volume when he is called by miniWDL :

docker run \
    --rm \
    --volume /var/run/docker.sock:/var/run/docker.sock \
    python:3.9.7-buster \
    bash -c '
    pip3 install miniwdl==1.4.1
    miniwdl run_self_test
    '

But when mounting the /tmp of my host on /tmp on the container side, it works:

docker run \
    --rm \
    --volume /tmp:/tmp \
    --volume /var/run/docker.sock:/var/run/docker.sock \
    python:3.9.7-buster \
    bash -c '
    pip3 install miniwdl==1.4.1
    miniwdl run_self_test
    '

I believe this is because of this docker-with-socket approach when miniWDL attempts to spin a container and bind volumes, that container is actually started by the daemon at the host level.

I’d like to use containers for miniWDL because it allows simple update everytime a new version of miniWDL comes out, but I’m open to cleaner solutions !

Thank you 😃

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
dpark01commented, Dec 9, 2021

Yes so the docker container (such as the Dockerfile in the gist above) is the space in which you execute miniwdl. That Dockerfile already sets environment variables that tell miniwdl to use udocker instead of docker. All your WDL tasks run inside udocker inside the docker – so no mounting docker sockets because you’re running udocker in userspace in the container.

No guarantees that it doesn’t crash the house.

0reactions
Melkazcommented, Feb 3, 2022

Thanks for this detailed answer @mlin, I’ll think about it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

miniwdl run optimization - Read the Docs
It's possible to operate miniwdl run inside a Docker container, with the following requirements: ... If the input files aren't already located within...
Read more >
miniwdl/Dockerfile at main - GitHub
builds docker image for running test suite for the contextual miniwdl ... run the full test suite -- notice configuration needed for it...
Read more >
Last update to this workflow version - Dockstore
Example scripts to run the workflows using miniwdl at the commandline, ... These scripts rely on miniwdl and docker to be installed as...
Read more >
miniwdl-aws - PyPI
Extends miniwdl to run workflows on AWS Batch and EFS. This miniwdl plugin enables it to execute WDL tasks as AWS Batch jobs....
Read more >
Design considerations for workflow management ... - bioRxiv
parallelization and run-time features follows in the main results sections ... Under the hood, for miniWDL to run locally, docker needs to.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found