Hello,
I have been using JavaScript in my resource requirements to dynamically determine the instance type to use based on my workflow inputs.
Backstory:
We’re running Illumina’s BCLConvert. This workflow scatters over the bclconvert tool over as many times as there are samplesheet configurations in the input list.
I have attached a diagram of the workflow cwl-ica/.github/catalogue/docs/workflows/bclconvert-with-qc-pipeline/4.0.3/bclconvert-with-qc-pipeline__4.0.3.md at main · umccr/cwl-ica · GitHub
And linked the tool cwl-ica/tools/bcl-convert/4.0.3/bcl-convert__4.0.3.cwl at main · umccr/cwl-ica · GitHub
For each bclconvert tool invocation, I would like to run the tool with cpu hardware unless the parameter --compression-format
is set to --dragen or --dragen-interleaved (in which case I’d need to run this on CPU hardware) for each configuration in the list.
I am able to update the resource requirements dynamically (and the script InitialWorkDirRequirement can handle both dragen invocation of bclconvert and the cpu invocation), however, I’d like to also be able to change the docker file (since FPGA hardware needs a different docker image to the CPU BCLConvert).
I can use the cwltool overrides option for dockerPull , however this would override the image for all tool invocations, and this might be different for different items.
I note that in 2.3. Expressions — Common Workflow Language User Guide 0.1 documentation (commonwl.org) it states JavaScript expressions are only allowed in certain spots (like ResourceRequirement and InitialWorkDirRequirement), is there a reason this is forbidden in DockerRequirement?
Alexis