Spaces:
Running

k-l-lambda commited on
Commit
5fd51ed
·
1 Parent(s): 7f52527

fix: use --extra-index-url so pip can resolve torch's build deps

Browse files

The build failed at the PyTorch pip step with:
ERROR: No matching distribution found for flit_core<4,>=3.11

Root cause: the PyTorch index lists the package as "typing-extensions"
while the wheel metadata declares "typing_extensions". Modern pip rejects
that name mismatch, discards the wheel, and falls back to a source build,
which needs flit_core — but --index-url had replaced PyPI, and the PyTorch
index carries neither flit_core nor most of torch's other deps.

--extra-index-url keeps PyPI primary so both the correctly-named wheel and
flit_core resolve. Pinned torch to 2.5.1+cpu (matching the version the
models were trained with) and the +cpu local version keeps the 196MB CPU
wheel rather than PyPI's 555MB CUDA build.

Previous builds passed only because the layer was cached; the cache went
cold on this export and exposed the latent problem.

1 file changed +8 -2
Dockerfile+8-2