tools icon indicating copy to clipboard operation
tools copied to clipboard

Add GPU labels to template

Open Zethson opened this issue 3 years ago • 0 comments

Description of feature

Had discussion on slack with @ewels and Claus Hultschig whose Github Account I do not know.

Might not hurt to add some GPU labels that people can use. Note that for GPU support you need to either use a CUDA enabled base Docker container or add stuff yourself which still is kind of ugly.

Draft:


  withLabel: with_all_gpus {
       maxForks = 1
       containerOptions = {
          workflow.containerEngine == "singularity" ? '--nv':
              ( workflow.containerEngine == "docker" ? '-u $(id -u):$(id -g) --gpus all': null ) } 
  }

  withLabel: with_single_gpu {
    maxForks = 1
       containerOptions = {
          workflow.containerEngine == "singularity" ? '--nv':
              ( workflow.containerEngine == "docker" ? '-u $(id -u):$(id -g) --gpus device=0': null ) }
  } 
}

single-cpu needs the device to be parameterized. Just opening this issue to keep track of this.

Zethson avatar Jan 19 '22 10:01 Zethson