feat(cellpose): update to v4.0.8 with GPU support#10306
Open
an-altosian wants to merge 10 commits intonf-core:masterfrom
Open
feat(cellpose): update to v4.0.8 with GPU support#10306an-altosian wants to merge 10 commits intonf-core:masterfrom
an-altosian wants to merge 10 commits intonf-core:masterfrom
Conversation
- Upgrade cellpose from 3.1.0 to 4.0.8 (includes SAM integration) - Replace private container with public quay.io/dongzehe/cellpose-gpu:4.0.8 - Add GPU support (process_gpu label, --use_gpu flag via task.ext.use_gpu) - Change model input from path to val (pretrained model name string) - Add maskname input for custom output filenames - Add cells output (seg.npy) for downstream analysis - Add Dockerfile for reproducible GPU container builds - Add environment.yml for conda channel reference - Update meta.yml to match new interface Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
Hi there, I saw that the cellpose module was updated three weeks ago but is still on cellpose 3. Here is a draft of updating it to cellpose v4 with GPU support, which has its cellpose-SAM based model compatibility. It works great on my side. |
- Remove environment.yml (module refuses conda, not in upstream)
- Remove maskname input (xenium-specific)
- Fix meta.yml: use non-tuple syntax for val inputs
- Update nf-test: provide model input as string
- Move outputs to ${prefix}/ with standard cellpose names
- Remove GPU detection logging and NPY_PROMOTION_STATE
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
nf-core lint auto-prepends quay.io/ for simple org/container:tag format. Explicit quay.io/ prefix triggers lint failure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mask and versions.yml md5 hashes differ from cellpose 3.1.0. Updated from CI docker test output. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add notes section to meta.yml: GPU usage, ext.args, model weights - Expand model input description with built-in model names - Add inline comments for env vars (HOME/MPLCONFIGDIR required by container) - Update nf-test snapshots (nf-test 0.9.3 metadata) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
val model doesn't stage files into the work directory, breaking custom model support in containerized/cloud environments. Revert to path(model) matching upstream interface. Pretrained model names go via ext.args. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change model input to tuple val(model_name), path(model_path):
- Custom model file: ["", file("/path/to/model")] — staged by Nextflow
- Pretrained name: ["cyto3", file("NO_FILE")] — downloaded at runtime
- Default: ["", file("NO_FILE")] — no --pretrained_model flag
model_path takes priority over model_name when both are provided.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use empty list [] instead of file("NO_FILE") for the optional model_path
input, following the nf-core standard for optional path inputs in tuples.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add fixOwnership to the docker profile and remove the redundant docker_self_hosted profile. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
biocontainers/cellpose:3.1.0_cv1with GPU-enableddongzehe/cellpose-gpu:4.0.8process_gpulabel andtask.ext.use_gpuflagmodelinput frompathtoval(pretrained model name string)cellsoutput (*seg.npy) for downstream analysis${prefix}/directory for consistencyDockerfilefor reproducible container buildsChanges
main.nfval modelinput,task.ext.use_gpu,cellsoutputmeta.ymlmodelasvalstring, addcellsoutputDockerfilepytorch/pytorch:2.5.1-cuda12.4-cudnn9-runtimetests/main.nf.testtests/main.nf.test.snapContainer
dongzehe/cellpose-gpu:4.0.8(hosted on quay.io, public)pytorch/pytorch:2.5.1-cuda12.4-cudnn9-runtimeGPU control
When
task.ext.use_gpuis not set or false, cellpose runs on CPU only.Usage
Licensing
segment_anything): Apache 2.0🤖 Generated with Claude Code