Add setup instructions for uv and configure PyTorch sources for Windows
Browse files- README.md +3 -0
- pyproject.toml +16 -0
README.md
CHANGED
|
@@ -86,6 +86,9 @@ GPU — it does not run on CPU/MPS. The MiniCPM judge runs fine without one, so
|
|
| 86 |
a machine with no CUDA GPU, disable image-gen with `WITCH_WOOD_GEN_ENABLED=0`.
|
| 87 |
|
| 88 |
```bash
|
|
|
|
|
|
|
|
|
|
| 89 |
# Full pipeline — real MiniCPM judge + image generation (image-gen needs a CUDA GPU):
|
| 90 |
python app.py
|
| 91 |
|
|
|
|
| 86 |
a machine with no CUDA GPU, disable image-gen with `WITCH_WOOD_GEN_ENABLED=0`.
|
| 87 |
|
| 88 |
```bash
|
| 89 |
+
# Set up the project with uv (https://github.com/astral-sh/uv)
|
| 90 |
+
uv sync
|
| 91 |
+
|
| 92 |
# Full pipeline — real MiniCPM judge + image generation (image-gen needs a CUDA GPU):
|
| 93 |
python app.py
|
| 94 |
|
pyproject.toml
CHANGED
|
@@ -33,6 +33,22 @@ dev = [
|
|
| 33 |
"pytest>=9.0.3",
|
| 34 |
]
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
[tool.pytest.ini_options]
|
| 37 |
pythonpath = ["."]
|
| 38 |
testpaths = ["tests"]
|
|
|
|
| 33 |
"pytest>=9.0.3",
|
| 34 |
]
|
| 35 |
|
| 36 |
+
# On Windows, pull torch/torchvision from the PyTorch CUDA index so GPU support
|
| 37 |
+
# is included. The HF ZeroGPU Space uses its own base image (Linux) and ignores
|
| 38 |
+
# these sources — they only activate locally via `uv sync`.
|
| 39 |
+
[tool.uv.sources]
|
| 40 |
+
torch = [
|
| 41 |
+
{ index = "pytorch-cuda", marker = "sys_platform == 'win32'" },
|
| 42 |
+
]
|
| 43 |
+
torchvision = [
|
| 44 |
+
{ index = "pytorch-cuda", marker = "sys_platform == 'win32'" },
|
| 45 |
+
]
|
| 46 |
+
|
| 47 |
+
[[tool.uv.index]]
|
| 48 |
+
name = "pytorch-cuda"
|
| 49 |
+
url = "https://download.pytorch.org/whl/cu128"
|
| 50 |
+
explicit = true
|
| 51 |
+
|
| 52 |
[tool.pytest.ini_options]
|
| 53 |
pythonpath = ["."]
|
| 54 |
testpaths = ["tests"]
|