ink-witch / pyproject.toml
gizzleon's picture
Add setup instructions for uv and configure PyTorch sources for Windows
2b1ce39
Raw
History Blame Contribute Delete
1.95 kB
[project]
name = "ink-witch"
version = "0.1.0"
description = "Inkwitch — a doodle-judging game on Hugging Face ZeroGPU"
readme = "README.md"
# ZeroGPU runtimes only ship Python 3.12.12 and 3.10.13; pin to 3.12 so the
# local venv matches the Space (README python_version: '3.12').
requires-python = ">=3.12,<3.13"
dependencies = [
# gradio matches the Space's sdk_version in README.md frontmatter. The
# [oauth,mcp] extras mirror what the HF Spaces builder injects
# (`gradio[oauth,mcp]==<sdk_version>`); declaring them here makes uv resolve
# transitive pins (notably pydantic <=2.12.5, required by the mcp extra)
# that are compatible with the Space's own install command.
"gradio[oauth,mcp]==6.16.0",
# ZeroGPU supports torch up to 2.11.0 (not 2.12+); torchvision 0.26.0 is the
# matching sidecar for torch 2.11.x.
"torch==2.11.0",
"torchvision==0.26.0",
"transformers>=5.10.1",
"accelerate>=1.13.0",
# SDXL-Flash + scribble ControlNet image-gen second stage (witch_wood/gen).
"diffusers>=0.32.0",
"pillow>=12.0.0",
# Declared so uv co-resolves its transitive constraints (e.g. psutil). It is
# provided by the ZeroGPU base image and excluded from the exported
# requirements.txt — never pin `spaces` for the Space.
"spaces>=0.42.1",
]
[dependency-groups]
dev = [
"pytest>=9.0.3",
]
# On Windows, pull torch/torchvision from the PyTorch CUDA index so GPU support
# is included. The HF ZeroGPU Space uses its own base image (Linux) and ignores
# these sources — they only activate locally via `uv sync`.
[tool.uv.sources]
torch = [
{ index = "pytorch-cuda", marker = "sys_platform == 'win32'" },
]
torchvision = [
{ index = "pytorch-cuda", marker = "sys_platform == 'win32'" },
]
[[tool.uv.index]]
name = "pytorch-cuda"
url = "https://download.pytorch.org/whl/cu128"
explicit = true
[tool.pytest.ini_options]
pythonpath = ["."]
testpaths = ["tests"]