Fix uv index configuration: Use PyTorch CUDA as additional index
- Changed from 'default' to named additional index - Added tool.uv.sources to specify torch comes from pytorch-cu121 index - Other packages (fastapi, uvicorn, etc.) still come from PyPI - Fixes: 'fastapi was not found in the package registry' error How it works: - PyPI remains the default index for most packages - torch package explicitly uses pytorch-cu121 index - Best of both worlds: CUDA PyTorch + all other packages from PyPI
This commit is contained in:
@@ -57,11 +57,15 @@ dev = [
|
||||
"pyinstaller>=6.17.0",
|
||||
]
|
||||
|
||||
# Use PyTorch CUDA index by default
|
||||
# Add PyTorch CUDA index as additional source
|
||||
# CUDA builds work on both GPU and CPU systems (fallback to CPU if no GPU)
|
||||
[[tool.uv.index]]
|
||||
name = "pytorch-cu121"
|
||||
url = "https://download.pytorch.org/whl/cu121"
|
||||
default = true
|
||||
|
||||
# Tell uv to get torch from the PyTorch CUDA index
|
||||
[tool.uv.sources]
|
||||
torch = { index = "pytorch-cu121" }
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 100
|
||||
|
||||
Reference in New Issue
Block a user