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

RunCellpose via docker #203

Merged
merged 11 commits into from
Aug 4, 2023
Merged

RunCellpose via docker #203

merged 11 commits into from
Aug 4, 2023

Conversation

callum-jpg
Copy link
Contributor

Here's the RunCellpose model that's been adapted to work with docker.

This version of the module allows users to use Cellpose using the .exe/.app downloaded from the CellProfiler website. All a user would have to do is download and install docker, followed by downloading the cellprofiler/runcellpose_no_pretrained or cellprofiler/runcellpose_with_pretrained docker images and setting the plugins directory in CellProfiler > Preferences. These different docker images either contain or don't contain all of the Cellpose pretrained models

Outstanding questions:

  • As of writing, the docker images cellprofiler/runcellpose_no_pretrained:0.1 and cellprofiler/runcellpose_with_pretrained:0.1 are built on the pytorch CUDA docker image and as a result are pretty beefy (12GB on disk for me). Since some users may not have a CUDA GPU, it might make sense to create a slim CPU version and allow users to select this from the GUI dropdown.
  • I've not tested running this Cellpose docker on a CUDA GPU, though I'm hoping the docker flag --gpus all handles this
  • Will determining docker_path work across different machines? How consistent is docker path? What is the docker path on linux?
  • As the module is upgraded over time, should the module variable_revision_number be linked to a particular version of a docker image? Hopefully this would ensure compatibility
  • I think how the custom model is loaded should be changed: a user should just have to find the model file itself, rather than finding the directory in which it's contained and then manually typing the model file name

@bethac07
Copy link
Member

bethac07 commented Jun 2, 2023

Awesome! One comment from me

As the module is upgraded over time, should the module variable_revision_number be linked to a particular version of a docker image? Hopefully this would ensure compatibility

I don't think so, Docker versioning SHOULD take care of that.

@@ -659,6 +659,6 @@ def upgrade_settings(self, setting_values, variable_revision_number, module_name
setting_values = setting_values + ["0.0", False, "15", "1.0", False, False]
variable_revision_number = 3
if variable_revision_number == 3:
setting_values = ["Python"]
setting_values = setting_values[0] + ["Python"] + setting_values[1:]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the Docker image, yes?

@bethac07 bethac07 merged commit 2d3b480 into master Aug 4, 2023
3 checks passed
@bethac07 bethac07 deleted the cellpose_docker branch August 4, 2023 20:49
DavidStirling pushed a commit to DavidStirling/CellProfiler-plugins that referenced this pull request Sep 25, 2023
* adding docker subprocess option to RunCellpose

* Dockerfile and associated script for building RunCellpose docker

* add docker documentation

* better docs since docker image is automatically downloaded when requested

* upgrade module version

* fix upgrade settings

* docs for using docker

* Add model to upgrade_settings

* Typo

* Fix upgrade_settings fixier

---------

Co-authored-by: Erin Weisbart <[email protected]>
Co-authored-by: Beth Cimini <[email protected]>
Co-authored-by: bethac07 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants