Skip to content
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
40 changes: 9 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,7 @@ uvx -p 3.13 "git+https://github.com/fdrgsp/cali[cp4]"

***NOTE**: use python 3.11 or greater. Swap `cp4` with `cp3` to use Cellpose 3.x.*

<br>

To use Cellpose with GPU (e.g. on Windows), the correct version of CUDA has to be installed:

```bash
uvx -p 3.13 --index pytorch-cu130=https://download.pytorch.org/whl/cu130 "git+https://github.com/fdrgsp/cali[cp4,cu130]"
```

***NOTE**: swap `cu130` with `cu126` or `cu128` for different CUDA versions and `cp4` with `cp3` to use Cellpose 3.x.*

***NOTE**: [NVIDIA Drivers](https://www.nvidia.com/en-us/drivers/) should be already installed. You can check what version of cuda you need by running:*

```bash
nvidia-smi
```
***NOTE**: `uvx` supports GPU acceleration on **macOS only** (via Apple MPS — no CUDA required). On Windows/Linux, use `(uv) pip install` instead (see [Installation](#installation)).*

### Installation

Expand All @@ -102,19 +88,15 @@ Install `cali` directly without cloning (use python 3.11 or greater):

<br>

To use Cellpose with GPU (e.g. on Windows), the correct version of CUDA has to be installed:
To use Cellpose with GPU on Windows/Linux, install PyTorch with the CUDA version matching your driver as a second step:

```bash
(uv) pip install --index pytorch-cu130=https://download.pytorch.org/whl/cu130 "git+https://github.com/fdrgsp/cali[cp4,cu130]"
(uv) pip install torch torchvision --index-url https://download.pytorch.org/whl/cu{VERSION}
```

***NOTE**: swap `cu130` with `cu126` or `cu128` for different CUDA versions and `cp4` with `cp3` to use Cellpose 3.x.*
Replace `{VERSION}` with your CUDA version (e.g. `cu126`, `cu128`, `cu130`). Run `nvidia-smi` to check which version your driver supports.

***NOTE**: [NVIDIA Drivers](https://www.nvidia.com/en-us/drivers/) should be already installed. You can check what version of cuda you need by running:*

```bash
nvidia-smi
```
***NOTE**: [NVIDIA Drivers](https://www.nvidia.com/en-us/drivers/) should be already installed.*

#### ▶ Using uv

Expand All @@ -135,19 +117,15 @@ uv sync --extra cp4

<br>

To use Cellpose with GPU (e.g. on Windows), the correct version of CUDA has to be installed. Add a CUDA extra alongside your Cellpose extra:
To use Cellpose with GPU on Windows/Linux, install PyTorch with the CUDA version matching your driver as a second step:

```bash
uv sync --extra cp4 --extra cu130 # Cellpose 4.x + CUDA 13.0
uv pip install torch torchvision --index-url https://download.pytorch.org/whl/cu{VERSION}
```

***NOTE**: swap `cu130` with `cu126` or `cu128` for different CUDA versions.*

***NOTE**: [NVIDIA Drivers](https://www.nvidia.com/en-us/drivers/) should be already installed. You can check what version of cuda you need by running:*
Replace `{VERSION}` with your CUDA version (e.g. `cu126`, `cu128`, `cu130`). Run `nvidia-smi` to check which version your driver supports.

```bash
nvidia-smi
```
***NOTE**: [NVIDIA Drivers](https://www.nvidia.com/en-us/drivers/) should be already installed.*

#### ▶ NOTES

Expand Down
34 changes: 0 additions & 34 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,13 @@ dependencies = [
# Cellpose is optional - choose the version that fits your Python version
cp3 = ["cellpose>=3.0.0,<4.0.0"]
cp4 = ["cellpose>=4.0.0"]
# CUDA variants for GPU-accelerated PyTorch (Windows/Linux only)
cu126 = ["torch", "torchvision"]
cu128 = ["torch", "torchvision"]
cu130 = ["torch", "torchvision"]

[tool.uv]
conflicts = [
[
{ extra = "cp3" },
{ extra = "cp4" },
],
[
{ extra = "cu126" },
{ extra = "cu128" },
{ extra = "cu130" },
],
]

[dependency-groups]
Expand All @@ -102,31 +93,6 @@ cali = "cali.__main__:main"

[tool.uv.sources]
cali = { workspace = true }
torch = [
{ index = "pytorch-cu126", extra = "cu126" },
{ index = "pytorch-cu128", extra = "cu128" },
{ index = "pytorch-cu130", extra = "cu130" },
]
torchvision = [
{ index = "pytorch-cu126", extra = "cu126" },
{ index = "pytorch-cu128", extra = "cu128" },
{ index = "pytorch-cu130", extra = "cu130" },
]

[[tool.uv.index]]
name = "pytorch-cu126"
url = "https://download.pytorch.org/whl/cu126"
explicit = true

[[tool.uv.index]]
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
explicit = true

[[tool.uv.index]]
name = "pytorch-cu130"
url = "https://download.pytorch.org/whl/cu130"
explicit = true

[tool.hatch.build.targets.wheel]
only-include = ["src"]
Expand Down
Loading