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.

Supporting docker post-command arguments

See original GitHub issue

Looking at the implementation, I feel like there are currently no way to provide additional arguments to docker. In some cases, this option would be useful such as for running commands with https://github.com/NVIDIA/nvidia-docker

I have found through the CLI argument --user-space-docker-cmd CMD that allows override of the ‘docker’ command (eg: udocker or else), but this override is placed before the enforced docker commands.

In the case of nvidia-docker, the docker command doesn’t actually need to be modified (toolkit hook replaces it), but flag --gpus '[options]' must be given after docker run to allow integration of CUDA devices within the container.

I guess I could define a custom RuntimeContext to implement this behaviour, but I was wondering if it was something that could be considered for direct implementation in the CLI to avoid hacking the code?

Would it be possible to add some kind of input argument like : --user-space-docker-run-args "args0 args1"

Expected Behavior

Allow to make a call as follows (or similar) :

cwltool --user-space-docker-run-args "--gpus all" [other-cwltool-args] process.cwl job.yml

Which would eventually run :

docker run --gpus all --volumes [...] [other-docker-args] docker-image:tag 

NOTE: This flag is allowed only with run, other will raise unknown argument. The extra arguments must therefore be command based.

Actual Behavior

Just doesn’t work because GPU cannot be found.

Your Environment

  • cwltool version: 2.0.20200126090152

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
fmigneaultcommented, Apr 25, 2020

@mr-c Thanks for the info. And yes, I would be glad to present it.

0reactions
mr-ccommented, May 3, 2020

Sure, we’ll be schedule you for the beginning of the call. Sorry about the mix-up; we are looking forward to it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker Engine post-installation steps
Docker Engine post-installation steps. These optional post-installation procedures shows you how to configure your Linux host machine to work better with ...
Read more >
Docker post command - Forums - Unraid
I wrote in 'Post argument': /bin/sh-c 'apt update - apt install -y ffmpeg' . Everything seems to work, but after a while the...
Read more >
Dev Container metadata reference
Supports the same values as the Docker CLI --mount flag. Environment and pre-defined variables may be referenced in the value. For example:
Read more >
Define a Command and Arguments for a Container - Kubernetes
This page shows how to define commands and arguments when you run a container in a Pod. Before you begin You need to...
Read more >
Chapter 5. Using the docker command and service
In particular, podman supports many of the same command-line options ... The docker command and service are not supported in Red Hat Enterprise...
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