Skip to content

Commit

Permalink
added gpu profile for cellpose
Browse files Browse the repository at this point in the history
  • Loading branch information
kbestak committed Oct 30, 2024
1 parent 641a0bb commit 5904f3e
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ testing*
*.pyc
.nf-test.log
.nf-test/
null
3 changes: 3 additions & 0 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,7 @@ process {
withName:'ILASTIK_PIXELCLASSIFICATION|ILASTIK_MULTICUT' {
label = "process_high"
}
withLabel:process_gpu {
ext.use_gpu = { use_gpu }
}
}
3 changes: 2 additions & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"cellpose": {
"branch": "master",
"git_sha": "7c1543a730197e2f0b8ca5141f851c4a2b08bed6",
"installed_by": ["modules"]
"installed_by": ["modules"],
"patch": "modules/nf-core/cellpose/cellpose.diff"
},
"deepcell/mesmer": {
"branch": "master",
Expand Down
23 changes: 23 additions & 0 deletions modules/nf-core/cellpose/cellpose.diff

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion modules/nf-core/cellpose/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ params {
max_multiqc_email_size = '25.MB'
multiqc_methods_description = null

// GPU for segmentation
use_gpu = false

// Boilerplate options
outdir = null
publish_dir_mode = 'copy'
Expand Down Expand Up @@ -187,6 +190,12 @@ profiles {
}
test { includeConfig 'conf/test.config' }
test_full { includeConfig 'conf/test_full.config' }
gpu {
docker.runOptions = '-u $(id -u):$(id -g) --gpus device=0'
apptainer.runOptions = '--no-mount tmp --writable-tmpfs --nv'
singularity.runOptions = '--no-mount tmp --writable-tmpfs --nv'
use_gpu = true
}
}

// Load nf-core custom profiles from different Institutions
Expand Down
9 changes: 7 additions & 2 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
},
"clahe_kernel": {
"type": "number",
"default": 25,
"default": 25.0,
"description": "Kernel size to be used by CLAHE.",
"fa_icon": "far fa-object-group"
},
Expand Down Expand Up @@ -411,5 +411,10 @@
{
"$ref": "#/$defs/generic_options"
}
]
],
"properties": {
"use_gpu": {
"type": "boolean"
}
}
}

0 comments on commit 5904f3e

Please sign in to comment.