Running -with-docker and mounting volumes #4260
-
Hi, I'm running my pipeline using the -with-docker option and I need to mount some folders from host as the input data. With the -with-docker option, each process will run in a container on its own. How do I make all the containers mount the same input data folder automatically. I know there's a docker scope with the runOptions which I can specify in nextflow.config but this would need to specify up front and the input folder which I mount is only specified during run time via command line. Is there a way that we can specify these dynamically and loaded by all containers? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
In general, you shouldn't need to mount any volumes explicitly in this way. When Nextflow executes a task, it looks at all of the So as long as you provide all of the input files as |
Beta Was this translation helpful? Give feedback.
You can use the
containerOptions
directive which is basically the same asdocker.runOptions
but can be per-process and dynamic based on the task inputs:containerOptions { "-v ${in1} -v ${in2} ..." }
Personally I think refactoring the vals to paths would be less work, but to each their own... 😄