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)
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user