Skip to content

Commit 1410e79

Browse files
adamtheturtleclaude
andcommitted
Fix torchvision CPU index and Docker venv creation
Add torchvision to [tool.uv.sources] so it also comes from the CPU index (piq depends on torchvision, which crashes on import with CPU-only torch when installed from PyPI). Restore python3 -m venv in the Dockerfile so pip install uv puts the uv binary into the venv's bin directory (which is on PATH), rather than ~/.local/bin (which is not). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent bb7179c commit 1410e79

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ version_scheme = "post-release"
140140

141141
[tool.uv]
142142
sources.torch = { index = "pytorch-cpu" }
143+
sources.torchvision = { index = "pytorch-cpu" }
143144
index = [ { name = "pytorch-cpu", url = "https://download.pytorch.org/whl/cpu", explicit = true } ]
144145

145146
[tool.ruff]

src/mock_vws/_flask_server/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ ENV UV_PROJECT_ENVIRONMENT=/app/docker_venvs/.venv
1616
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
1717

1818
WORKDIR /app
19-
RUN pip install --no-cache-dir uv==0.10.4 && \
19+
RUN python3 -m venv $VIRTUAL_ENV && \
20+
pip install --no-cache-dir uv==0.10.4 && \
2021
uv sync --no-cache
2122
EXPOSE 5000
2223
ENTRYPOINT ["python"]

0 commit comments

Comments
 (0)