e-mon's picture
sync
088e7fb
Raw History Blame Contribute Delete
556 Bytes
.PHONY: style format sync-requirements
style:
uv run ruff check --fix .
quality:
uv run ruff check .
# uv export cannot emit --extra-index-url from [tool.uv.sources] into
# requirements.txt (astral-sh/uv#13572, #10008 — "working as intended").
# HF Spaces only reads requirements.txt, so we regenerate via uv export and
# then splice the pytorch-cpu index back in.
sync-requirements:
uv lock
uv export --format requirements-txt --no-hashes -o requirements.txt
sed -i '3i--extra-index-url https://download.pytorch.org/whl/cpu' requirements.txt