Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scanpy GPU image #130

Merged
merged 4 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ process {
withLabel:process_high_memory {
memory = { 200.GB * task.attempt * params.memory_scale }
}
withLabel:process_gpu {
ext.use_gpu = { use_gpu }
withLabel: process_gpu {
ext.use_gpu = {workflow.profile.contains('gpu')}
}
withLabel:error_ignore {
errorStrategy = 'ignore'
Expand Down
2 changes: 1 addition & 1 deletion modules/local/scanpy/harmony/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process SCANPY_HARMONY {
label 'process_gpu'

conda "${moduleDir}/environment.yml"
container "${ task.ext.use_gpu ? 'ghcr.io/scverse/rapids_singlecell:v0.10.8' :
container "${ task.ext.use_gpu ? 'ghcr.io/scverse/rapids_singlecell:v0.10.11' :
workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'oras://community.wave.seqera.io/library/harmonypy_scanpy:25dd7b6ef4c76098':
'community.wave.seqera.io/library/harmonypy_scanpy:e9c9a621297da9ea' }"
Expand Down
2 changes: 1 addition & 1 deletion modules/local/scanpy/hvgs/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process SCANPY_HVGS {
label 'process_gpu'

conda "${moduleDir}/environment.yml"
container "${ task.ext.use_gpu ? 'ghcr.io/scverse/rapids_singlecell:v0.10.8' :
container "${ task.ext.use_gpu ? 'ghcr.io/scverse/rapids_singlecell:v0.10.11' :
workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'oras://community.wave.seqera.io/library/python-igraph_scanpy:a7114d55b0af3893':
'community.wave.seqera.io/library/python-igraph_scanpy:5f677450e42211ef' }"
Expand Down
2 changes: 1 addition & 1 deletion modules/local/scanpy/leiden/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process SCANPY_LEIDEN {
// label 'process_gpu' Issue: https://github.com/scverse/rapids_singlecell/issues/286

conda "${moduleDir}/environment.yml"
container "${ task.ext.use_gpu ? 'ghcr.io/scverse/rapids_singlecell:v0.10.8' :
container "${ task.ext.use_gpu ? 'ghcr.io/scverse/rapids_singlecell:v0.10.11' :
workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'oras://community.wave.seqera.io/library/leidenalg_python-igraph_scanpy:4c35b8e384d7de2d':
'community.wave.seqera.io/library/leidenalg_python-igraph_scanpy:ba212a162d290cb6' }"
Expand Down
2 changes: 1 addition & 1 deletion modules/local/scanpy/neighbors/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process SCANPY_NEIGHBORS {
label 'process_gpu'

conda "${moduleDir}/environment.yml"
container "${ task.ext.use_gpu ? 'ghcr.io/scverse/rapids_singlecell:v0.10.8' :
container "${ task.ext.use_gpu ? 'ghcr.io/scverse/rapids_singlecell:v0.10.11' :
workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'oras://community.wave.seqera.io/library/python-igraph_scanpy:a7114d55b0af3893':
'community.wave.seqera.io/library/python-igraph_scanpy:5f677450e42211ef' }"
Expand Down
2 changes: 1 addition & 1 deletion modules/local/scanpy/rankgenesgroups/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process SCANPY_RANKGENESGROUPS {
label 'process_gpu'

conda "${moduleDir}/environment.yml"
container "${ task.ext.use_gpu ? 'ghcr.io/scverse/rapids_singlecell:v0.10.8' :
container "${ task.ext.use_gpu ? 'ghcr.io/scverse/rapids_singlecell:v0.10.11' :
workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'oras://community.wave.seqera.io/library/scanpy:1.10.1--ea08051addf267ac':
'community.wave.seqera.io/library/scanpy:1.10.1--0c8c97148fc05558' }"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def format_yaml_like(data: dict, indent: int = 0) -> str:

if adata.obs["${obs_key}"].value_counts().size > 1:
if use_gpu:
os.environ["CUPY_CACHE_DIR"] = "./tmp/cupy"

import rapids_singlecell as rsc
import rmm
from rmm.allocators.cupy import rmm_cupy_allocator
Expand Down
2 changes: 1 addition & 1 deletion modules/local/scanpy/scrublet/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process SCANPY_SCRUBLET {
label 'process_gpu'

conda "${moduleDir}/environment.yml"
container "${ task.ext.use_gpu ? 'ghcr.io/scverse/rapids_singlecell:v0.10.8' :
container "${ task.ext.use_gpu ? 'ghcr.io/scverse/rapids_singlecell:v0.10.11' :
workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'oras://community.wave.seqera.io/library/scanpy_scikit-image:185956e1b73ad93d':
'community.wave.seqera.io/library/scanpy_scikit-image:066cc4cb329a805c' }"
Expand Down
2 changes: 1 addition & 1 deletion modules/local/scanpy/umap/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process SCANPY_UMAP {
label 'process_gpu'

conda "${moduleDir}/environment.yml"
container "${ task.ext.use_gpu ? 'ghcr.io/scverse/rapids_singlecell:v0.10.8' :
container "${ task.ext.use_gpu ? 'ghcr.io/scverse/rapids_singlecell:v0.10.11' :
workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'oras://community.wave.seqera.io/library/scanpy:1.10.1--ea08051addf267ac':
'community.wave.seqera.io/library/scanpy:1.10.1--0c8c97148fc05558' }"
Expand Down
7 changes: 3 additions & 4 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,9 @@ profiles {
executor.memory = 8.GB
}
gpu {
docker.runOptions = '-u $(id -u):$(id -g) --gpus all'
apptainer.runOptions = '--nv'
singularity.runOptions = '--nv'
use_gpu = true
docker.runOptions = '-u $(id -u):$(id -g) --gpus all'
apptainer.runOptions = '--nv'
singularity.runOptions = '--nv'
}
test { includeConfig 'conf/test.config' }
test_full { includeConfig 'conf/test_full.config' }
Expand Down
Loading