diff --git a/README.md b/README.md index 65bcdc4a..876a7d07 100644 --- a/README.md +++ b/README.md @@ -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.* -
- -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 @@ -102,19 +88,15 @@ Install `cali` directly without cloning (use python 3.11 or greater):
-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 @@ -135,19 +117,15 @@ uv sync --extra cp4
-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 diff --git a/pyproject.toml b/pyproject.toml index 56d25163..1ae0ef4c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,10 +61,6 @@ 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 = [ @@ -72,11 +68,6 @@ conflicts = [ { extra = "cp3" }, { extra = "cp4" }, ], - [ - { extra = "cu126" }, - { extra = "cu128" }, - { extra = "cu130" }, - ], ] [dependency-groups] @@ -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"]