Anthony Gagnon
10/07/2025, 2:23 AMnextflow inspect rather than regex patterns, would it be possible to allow users to pass a params.yml file containing some parameters that could enable the selection of specific containers?
The use case I have in mind is for GPU/CPU containers. We currently have both in our neuroimaging module library, which we can select at runtime, depending on whether we have a GPU or not. It would be cool if we could pass --gpu true within a params.yml file to the download command so it does not always download the CPU version.
Thanks all! (PS. Not sure if my question is clear, happy to provide further details if needed!)Phil Ewels
10/07/2025, 6:29 AMcontainer attribute? (vs. The param choosing between different processes?)Phil Ewels
10/07/2025, 6:30 AMPhil Ewels
10/07/2025, 6:30 AMAnthony Gagnon
10/07/2025, 5:03 PMcontainer "${ task.ext.use_gpu ? '<http://us.gcr.io/broad-dsde-methods/cellbender:0.3.2|us.gcr.io/broad-dsde-methods/cellbender:0.3.2>' :
workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'<https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/eb/ebcf140f995f79fcad5c17783622e000550ff6f171771f9fc4233484ee6f63cf/data>':
'<http://community.wave.seqera.io/library/cellbender_webcolors:156d413fdfc16cdb|community.wave.seqera.io/library/cellbender_webcolors:156d413fdfc16cdb>' }"
This was taken from the cellbender/removebackground module.Anthony Gagnon
10/07/2025, 5:04 PM$task.ext params to each module within a pipeline. However, I assume a pipeline would have a global --gpu parameter that would toggle on/off this $task.ext in each module, which is the one I would like to be able to give to the nf-core pipelines download command.Phil Ewels
10/07/2025, 5:25 PMPhil Ewels
10/07/2025, 5:25 PMPhil Ewels
10/07/2025, 5:25 PMmeta.yml files for modulesPhil Ewels
10/07/2025, 5:28 PMmeta.yml would look something like this:Phil Ewels
10/07/2025, 5:28 PMPhil Ewels
10/07/2025, 5:29 PMnextflow run <pipeline> -profile docker,gpuPhil Ewels
10/07/2025, 5:30 PMconfig/containers_docker_gpu.config would probably be quite short, only the modules with gpu defined. Then it'd overwrite the containers specified by config/containers_docker_amd64.config for those processes.Phil Ewels
10/07/2025, 5:31 PMAnthony Gagnon
10/07/2025, 6:11 PMAnthony Gagnon
10/07/2025, 6:12 PM