From 0bcd8e8d21c73ddf93858ed99d0e4770cd0474c7 Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Fri, 26 Dec 2025 12:08:42 -0800 Subject: [PATCH] Configure uv to always use PyTorch CUDA index Changes: - Set PyTorch CUDA index (cu121) as default for all builds - CUDA builds support both GPU and CPU (auto-fallback) - Fixes uv run reinstalling CPU-only PyTorch - Updated dependency-groups syntax (fixes deprecation warning) Benefits: - Simpler build process - no CPU vs CUDA distinction needed - uv sync and uv run now get CUDA-enabled PyTorch automatically - Builds work on systems with or without NVIDIA GPUs - Fixes issue where uv run check_cuda.py was getting CPU version Index: https://download.pytorch.org/whl/cu121 (PyTorch 2.5.1+cu121) --- pyproject.toml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e264e2f..5b26bdd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,11 +52,17 @@ build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] packages = ["client", "gui"] -[tool.uv] -dev-dependencies = [ +[dependency-groups] +dev = [ "pyinstaller>=6.17.0", ] +# Use PyTorch CUDA index by default +# CUDA builds work on both GPU and CPU systems (fallback to CPU if no GPU) +[[tool.uv.index]] +url = "https://download.pytorch.org/whl/cu121" +default = true + [tool.ruff] line-length = 100 target-version = "py39"