Skip to content
Open
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
61 changes: 61 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Dockerfile by Sebastián Sterling
FROM accetto/ubuntu-vnc-xfce-g3:latest

USER root

WORKDIR /Cellpose


# Install Packages
RUN apt-get clean && rm -rf /var/lib/apt/lists/* && \
apt-get update --fix-missing && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
ffmpeg \
vim \
git \
python3-pip \
mesa-common-dev \
libgl1-mesa-dri \
libxcb-cursor0 \
mesa-utils \
libsm6 \
libxext6 \
libxrender1 \
libfontconfig1 \
libxkbcommon-x11-0 \
libxcb-xinerama0 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-render-util0 \
libxcb-xfixes0 \
libturbojpeg \
libjpeg-dev \
zlib1g-dev \
build-essential \
&& rm -rf /var/lib/apt/lists/*

RUN apt update && apt upgrade -y
COPY requirements.txt .


#### Install Cellpose ####
RUN pip3 install --break-system-packages torch torchvision --index-url https://download.pytorch.org/whl/cu126
RUN pip3 install --break-system-packages git+https://www.github.com/mouseland/cellpose.git
RUN pip3 install --break-system-packages 'cellpose[gui]'
RUN pip3 install --break-system-packages cellpose
#### Install Cellpose ####


ENV VNC_PW=@Pass-Word4321 \
VNC_RESOLUTION=1280x800

CMD ["python3", "-m", "cellpose"]

# sudo docker build -t cellpose-web .
# sudo docker run -d --name cellpose-vnc -p 36901:6901 --hostname quick cellpose-web

# To run it with GPUS
# sudo docker run -d --name cellpose-vnc --gpus all -p 36901:6901 --hostname quick cellpose-web

91 changes: 84 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,90 @@ Venv ([tutorial](https://docs.python-guide.org/dev/virtualenvs/#lower-level-virt

If you are using a GPU, make sure its drivers and the cuda libraries are correctly installed.

1. Install python3.8 or later from [python.org](https://www.python.org/downloads/). This will be the version of python that will be used in the environment. You can check your python version with `python --version`.
2. Navigate to the directory where you want to create the environment and run `python3 -m venv cellpose` to create a new environment called `cellpose`.
3. Activate the environment with `source cellpose/bin/activate` on Mac/Linux or `cellpose\Scripts\activate` on Windows. A prefix `(cellpose)` should appear in the terminal.
4. Install cellpose into the `cellpose` venv using pip with `python -m pip install cellpose`.
5. Install the cellpose GUI, with `python -m pip install cellpose[gui]`. Depending on your terminal software, you may need to use quotes like this: `python -m pip install 'cellpose[gui]'`.
6. You can now run cellpose from this environment with `python -m cellpose` or `cellpose` if you are in the cellpose directory.
7. To deactivate the environment, run `deactivate`.
#### 1. Install python3.8 or later from [python.org](https://www.python.org/downloads/). This will be the version of python that will be used in the environment. You can check your python version with:
```bash
python --version
```
#### 2. Navigate to the directory where you want to create the environment and run:
```bash
python3 -m venv cellpose
```
#### to create a new environment called `cellpose`.
#### 3. Activate the environment with:
```bash
source cellpose/bin/activate
```
#### on Mac/Linux or:
```bash
cellpose\Scripts\activate
```
#### on Windows. A prefix `(cellpose)` should appear in the terminal.

#### 4. Install cellpose into the `cellpose` venv using pip with:
```bash
python -m pip install cellpose
```

#### 5. Install the cellpose GUI, with:
```bash
python -m pip install cellpose[gui]
```
#### Depending on your terminal software, you may need to use quotes like this:
```bash
python -m pip install 'cellpose[gui]'
```

#### 6. You can now run cellpose from this environment with:
```bash
python -m cellpose`
```
#### or
```bash
cellpose
```
#### if you are in the cellpose directory, and you can also run cellpose on the Background adding `&` at the end of the command.

#### 7. If there's any missed package, you can try using:
```bash
pip install -r requirements.txt
```

#### 8. To deactivate the environment, run:
```bash
deactivate
```

### Option 3: Installation instruction using Docker
Docker is an open-source platform to automates the deployment of applications within lightweight, portable containers. This is crucial for modern application development, as it simplifies the deployment process it also improves resources efficiency.

To run the following commands, make sure you have previously installed [Docker](https://docs.docker.com/engine/install/).

#### 1. You can create and edit the image with the `Dockerfile` in the repository.
#### To create, you use (in the same directory of Dockerfile):
```bash
sudo docker build cellpose-vnc-image .
```
#### Or you can Pull the image from [DockerHub](https://hub.docker.com/r/sethsterling/ubuntu-vnc-xfce-cellpose-gui):
```bash
sudo docker pull sethsterling/ubuntu-vnc-xfce-cellpose-gui:latest
```


#### 2. Run the container using:

```bash
sudo docker run -d --name cellpose-vnc -p 36901:6901 --hostname quick sethsterling/ubuntu-vnc-xfce-cellpose-gui:latest

# To run it with GPUS
sudo docker run -d --name cellpose-vnc --gpus all -p 36901:6901 --hostname quick sethsterling/ubuntu-vnc-xfce-cellpose-gui:latest
```

#### 3. Enter to your device ip with port `36901` (as placed in the `docker run` command) (e.g. [127.0.0.0:36901](http://127.0.0.0:36901)).

#### 4. Put the password: `@Pass-Word4321` as default, or you can change it adding: `-e VNC_PW=[Your_Custom_Password]` in the `docker run` command.

#### 5. You must be interested on setting the file transfer between your system and the container, in that case you should set up a volume using the flag `-v /path/to/your/files/:/Cellpose` in the `docker run` command.


### GPU version (CUDA) on Windows or Linux

Expand Down
49 changes: 49 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
cellpose @ git+https://www.github.com/mouseland/cellpose.git@9e5cc9cc70fdafe3442e21189d2d4eaf2c87425a
fastremap==1.17.1
filelock==3.13.1
fill_voids==2.1.0
fsspec==2024.6.1
imagecodecs==2025.3.30
Jinja2==3.1.4
MarkupSafe==2.1.5
mpmath==1.3.0
natsort==8.4.0
networkx==3.3
numpy==1.26.4
nvidia-cublas-cu12==12.6.4.1
nvidia-cuda-cupti-cu12==12.6.80
nvidia-cuda-nvrtc-cu12==12.6.77
nvidia-cuda-runtime-cu12==12.6.77
nvidia-cudnn-cu12==9.5.1.17
nvidia-cufft-cu12==11.3.0.4
nvidia-cufile-cu12==1.11.1.6
nvidia-curand-cu12==10.3.7.77
nvidia-cusolver-cu12==11.7.1.2
nvidia-cusparse-cu12==12.5.4.2
nvidia-cusparselt-cu12==0.6.3
nvidia-nccl-cu12==2.26.2
nvidia-nvjitlink-cu12==12.6.85
nvidia-nvtx-cu12==12.6.77
opencv-python-headless==4.11.0.86
packaging==25.0
pillow==11.0.0
Pygments==2.19.2
PyQt6==6.9.1
PyQt6-Qt6==6.9.1
PyQt6_sip==13.10.2
pyqtgraph==0.13.7
QtPy==2.4.3
roifile==2025.5.10
scipy==1.16.0
segment-anything==1.0
setuptools==68.1.2
superqt==0.7.5
sympy==1.13.3
tifffile==2025.6.11
torch==2.7.1+cu126
torchvision==0.22.1+cu126
tqdm==4.67.1
triton==3.3.1
typing_extensions==4.12.2
urllib3==2.0.7
wheel==0.42.0