You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Running cellpose distribute on a SLURM cluster #1111
Find times when we can both be working at the same time, where I push code changes and you test them on your SLURM cluster
Your cluster must have some documentation that I can access while building so I can confirm that I am interfacing distributed Cellpose with the cluster correctly
If that sounds reasonable to you then we can work on it together. I already have a SLURM cluster implementation which works on another system, but it's not quite ready to be added to Cellpose yet. So I have a head start. Just let me know.
Hi, I would be happy to help and I am sure we can find time to test changes quickly. Regarding the last point: What information would you need roughly?
Some systems have maximum quotas for CPUs, RAM, and GPUs. Some systems assign resources together in bundles, such as, "every CPU requested comes with 15GB RAM" or "you must request a ratio of 8-to-1 CPUs to GPUs." Some systems have preferred locations for temporary files. We want to be sure that we're respecting all these parameters, or at least giving the user the right options to make sure their submissions are compatible with the cluster's specific requirements. Building systems that move easily from one cluster to another is difficult because cluster management is not standardized like personal computers are.
Let's first just meet and get my fork of distributed Cellpose installed on your cluster. Then I can add my existing SLURM implementation, you can pull the addition, and we'll see how well it runs. Then we'll determine what adaptations need to be made.
I'm not really available for this until the second week of March. I would prefer to meet on a Friday if you can. I am in the GMT-5 time zone, it appears you are in GMT+1? Times that make sense for our time difference would probably be between 9am and 12pm GMT-5 (3pm - 6pm GMT+1). How does that sound?
Hi @GFleishman. Could I help with testing? What are the minimum system requirements? Direct access to the cluster by external parties may be an issue. Is there a convenient way to forward relevant results, logs etc?
Hi @ralfox - I do not need direct access to your cluster. But you need to know enough about your cluster to help me accommodate any specific requirements it might have. Access to your cluster documentation, or at least you relaying any necessary information from that documentation to me, is probably necessary. That is something we could accomplish working together over a zoom meeting for example. Repeating these here:
Create a new conda environment and install my fork of Cellpose from source - you must be proficient with conda and git
Find times when we can both be working at the same time, where I push code changes and you test them on your SLURM cluster
Your cluster must have some documentation that I can access while building so I can confirm that I am interfacing distributed Cellpose with the cluster correctly
Thank you @GFleishman. No issue re points 1-3 (configuring environment, running cellpose, test). As of cluster documentation - I have to rely on the IT team operating the cluster.
Can you provide data for testing?
@ralfox - Interesting, I was not aware of the possibility of a local SLURM workload manager. I'm not sure how those work. If I get one of those running, say on my Linux workstation, does that create a SLURM interface for my own system ? Like something I can submit jobs to using SLURM syntax, and it knows how to translate that into resource allocation and execution on my native system? If that is the case, I can see it being very useful, but also creating more work for me to learn how to use it and what its benefits/limits are as a testing environment. I'm not opposed to doing that, but adding SLURM to distributed Cellpose is not really something I need personally for my own work, it's just something I'm willing to do for the community if there is demand (which it seems there is). If it is overall fewer required hours, I would prefer to just test on an actual SLURM cluster with the help of someone who will actually be executing on that cluster.
Yes, I can provide a small 512^3 crop of data for testing.
@GFleishman My understanding is that https://github.com/Cellular-Imaging-Amsterdam-UMC/NL-BIOMERO-Local-Slurm/blob/master/docker-compose.yml configures all services required to run a SLURM system across a set of Docker containers. In this instance, there appear to be two containers named c1 and c2 for running the workloads. The difference to running a cluster on bare metal may only be to ssh into slurm@host.docker.internal instead of a real machine, and retrieving results from within the Docker containers.
I am happy to give this a try and share the process and outcomes here.
Hi, there are a number of researchers in my institution who have been asking about this. I would be happy to take part in any testing you need, and can meet your requirements.
We have volumes of a cephalopod brain that were imaged using Synchrotron X-ray. We were able to run cellpose locally on some of them but get memory issues on larger ones.
Checking in to see if anyone has tried this on a SLURM cluster (with Nvidia Gpus) on large scale 2D data?
From what I understand the distributed functionality is mainly intended for 3D data but it would be interesting to see if this could be adapted for large scale 2D images and then be run on the cluster (currently maxing out our microscope at 100gb for one large image).
The way I would go about this right now is to handle the tiling manually first and then just push individual SLURM jobs for eeach tile and let SLURM figure out the parallelization with available ressources on the cluster. However doing it like this would come with the extra step of putting the results back together, taking care of overlap and edges, ...
Activity
GFleishman commentedon Feb 17, 2025
Hi Ozba - I am willing to add a SLURM cluster to distributed Cellpose if you are willing to be a pro-active beta tester. This would require you to:
If that sounds reasonable to you then we can work on it together. I already have a SLURM cluster implementation which works on another system, but it's not quite ready to be added to Cellpose yet. So I have a head start. Just let me know.
ozlembahar commentedon Feb 18, 2025
Hi, I would be happy to help and I am sure we can find time to test changes quickly. Regarding the last point: What information would you need roughly?
GFleishman commentedon Feb 18, 2025
Some systems have maximum quotas for CPUs, RAM, and GPUs. Some systems assign resources together in bundles, such as, "every CPU requested comes with 15GB RAM" or "you must request a ratio of 8-to-1 CPUs to GPUs." Some systems have preferred locations for temporary files. We want to be sure that we're respecting all these parameters, or at least giving the user the right options to make sure their submissions are compatible with the cluster's specific requirements. Building systems that move easily from one cluster to another is difficult because cluster management is not standardized like personal computers are.
Let's first just meet and get my fork of distributed Cellpose installed on your cluster. Then I can add my existing SLURM implementation, you can pull the addition, and we'll see how well it runs. Then we'll determine what adaptations need to be made.
I'm not really available for this until the second week of March. I would prefer to meet on a Friday if you can. I am in the GMT-5 time zone, it appears you are in GMT+1? Times that make sense for our time difference would probably be between 9am and 12pm GMT-5 (3pm - 6pm GMT+1). How does that sound?
GFleishman commentedon Mar 4, 2025
Hi @ozlembahar - just checking in with you again if you're still interested in this.
ralfox commentedon Mar 10, 2025
Hi @GFleishman. Could I help with testing? What are the minimum system requirements? Direct access to the cluster by external parties may be an issue. Is there a convenient way to forward relevant results, logs etc?
GFleishman commentedon Mar 10, 2025
Hi @ralfox - I do not need direct access to your cluster. But you need to know enough about your cluster to help me accommodate any specific requirements it might have. Access to your cluster documentation, or at least you relaying any necessary information from that documentation to me, is probably necessary. That is something we could accomplish working together over a zoom meeting for example. Repeating these here:
ralfox commentedon Mar 10, 2025
Thank you @GFleishman. No issue re points 1-3 (configuring environment, running cellpose, test). As of cluster documentation - I have to rely on the IT team operating the cluster.
Can you provide data for testing?
ralfox commentedon Mar 11, 2025
For testing purposes, would it be meaningful to use a local SLURM workload manager.
It is very simple to spin up with, e.g., this repository:
https://github.com/Cellular-Imaging-Amsterdam-UMC/NL-BIOMERO-Local-Slurm
GFleishman commentedon Mar 11, 2025
@ralfox - Interesting, I was not aware of the possibility of a local SLURM workload manager. I'm not sure how those work. If I get one of those running, say on my Linux workstation, does that create a SLURM interface for my own system ? Like something I can submit jobs to using SLURM syntax, and it knows how to translate that into resource allocation and execution on my native system? If that is the case, I can see it being very useful, but also creating more work for me to learn how to use it and what its benefits/limits are as a testing environment. I'm not opposed to doing that, but adding SLURM to distributed Cellpose is not really something I need personally for my own work, it's just something I'm willing to do for the community if there is demand (which it seems there is). If it is overall fewer required hours, I would prefer to just test on an actual SLURM cluster with the help of someone who will actually be executing on that cluster.
Yes, I can provide a small 512^3 crop of data for testing.
ralfox commentedon Mar 13, 2025
@GFleishman My understanding is that https://github.com/Cellular-Imaging-Amsterdam-UMC/NL-BIOMERO-Local-Slurm/blob/master/docker-compose.yml configures all services required to run a SLURM system across a set of Docker containers. In this instance, there appear to be two containers named
c1andc2for running the workloads. The difference to running a cluster on bare metal may only be tosshintoslurm@host.docker.internalinstead of a real machine, and retrieving results from within the Docker containers.I am happy to give this a try and share the process and outcomes here.
nm728 commentedon Apr 28, 2025
Hi, there are a number of researchers in my institution who have been asking about this. I would be happy to take part in any testing you need, and can meet your requirements.
karimi-ali commentedon Aug 1, 2025
Hey @GFleishman and others:
We have volumes of a cephalopod brain that were imaged using Synchrotron X-ray. We were able to run cellpose locally on some of them but get memory issues on larger ones.
We have a SLURM cluster and here's how you request GPUs:
https://docs.mpcdf.mpg.de/doc/computing/raven-user-guide.html#gpu-job-using-1-2-or-4-gpus-on-a-single-node
There are resource limits on the jobs:
https://docs.mpcdf.mpg.de/doc/computing/raven-user-guide.html#slurm-batch-system:~:text=Overview%20of%20the%20available,16%20%20%20%20%20%20%2024%3A00%3A00%0A%20%20%20%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D
as well as interactive nodes (access point to the cluster):
https://docs.mpcdf.mpg.de/doc/computing/raven-user-guide.html#resource-limits
I'd be happy to meet and test your code for parallelised implementation of cellpose.
LukasHats commentedon Sep 18, 2025
Is there any progress here?
MrMupfel commentedon Jan 16, 2026
@GFleishman
Checking in to see if anyone has tried this on a SLURM cluster (with Nvidia Gpus) on large scale 2D data?
From what I understand the distributed functionality is mainly intended for 3D data but it would be interesting to see if this could be adapted for large scale 2D images and then be run on the cluster (currently maxing out our microscope at 100gb for one large image).
The way I would go about this right now is to handle the tiling manually first and then just push individual SLURM jobs for eeach tile and let SLURM figure out the parallelization with available ressources on the cluster. However doing it like this would come with the extra step of putting the results back together, taking care of overlap and edges, ...
Cheers,
Florian
karimi-ali commentedon May 5, 2026
@GFleishman and others. I opened two PRs (one for v3 and one for v4 cellpose) for adding slurm support. I have tested them on Max Planck's RAVEN cluster:https://docs.mpcdf.mpg.de/doc/computing/raven-user-guide.html
Let me know what you think.