Skip to content

Commit

Permalink
Specify GPU device(s) visible to docker (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
PubuduSaneth authored Sep 6, 2024
2 parents b1c4594 + 1156614 commit fff8335
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
24 changes: 20 additions & 4 deletions workflows/conf/docker.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,33 @@ process {

docker.runOptions = '-u $(id -u):$(id -g)'

// Parabricks configurations
// Specify the GPU devices visible to each process
withName:'pbrun_fq2bam' {
container = "nvcr.io/nvidia/clara/clara-parabricks:4.3.0-1"
containerOptions = '--gpus \'"device=0,1,2,3"\' --rm'
}
withName:'pbrun_applybqsr' {
container = "nvcr.io/nvidia/clara/clara-parabricks:4.3.0-1"
containerOptions = '--gpus \'"device=0"\' --rm'
}
withName:'pbrun_haplotypecaller' {
container = "nvcr.io/nvidia/clara/clara-parabricks:4.3.0-1"
containerOptions = '--gpus \'"device=0,1,2,3"\' --rm'
}
withName:'pbrun_deepvariant' {
container = "nvcr.io/nvidia/clara/clara-parabricks:4.3.0-1"
containerOptions = '--gpus \'"device=0,1,2,3"\' --rm'
}


withName:'bwa' {
container = "pubudusaneth/bwa_samtools_amd64:v0.7.17.v1.18"
// Source: https://github.com/NAICNO/NAIC-Dockerfiles/blob/main/bwa-samtools/Dockerfile
}
withName:'gatk_.*' {
container = "docker.io/broadinstitute/gatk:4.3.0.0"
}
withName:'pbrun_.*' {
container = "nvcr.io/nvidia/clara/clara-parabricks:4.3.0-1"
containerOptions = '--gpus all --rm'
}
withName:"deepvariant" {
container = "google/deepvariant:1.5.0"
}
Expand Down
14 changes: 14 additions & 0 deletions workflows/conf/resource.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,28 @@ process {
cpus='12'
}

// Parabricks configurations
// Specify resources for each process

withName:'pbrun_fq2bam' {
memory='120 GB'
cpus='42'
gpu='4'
}
// pbrun_applybqsr is recommended to run on 1 GPU
withName:'pbrun_applybqsr' {
memory='120 GB'
cpus='42'
gpu='1'
}
withName:'pbrun_deepvariant' {
memory='120 GB'
cpus='42'
gpu='4'
}
withName:'pbrun_haplotypecaller' {
memory='120 GB'
cpus='42'
gpu='4'
}

Expand Down

0 comments on commit fff8335

Please sign in to comment.