Supporting docker post-command arguments
See original GitHub issueLooking 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:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top GitHub Comments
@mr-c Thanks for the info. And yes, I would be glad to present it.
Sure, we’ll be schedule you for the beginning of the call. Sorry about the mix-up; we are looking forward to it!