build(client): use locked uv environment in launcher and Docker

This commit is contained in:
2026-10-06 18:27:09 -03:00
parent f8d5b7857a
commit fa00b36e49
16 changed files with 230 additions and 53 deletions
+13 -5
View File
@@ -2,16 +2,24 @@
# Serve backend APIs, the WebSocket proxy, and shared project documentation.
# Run the React/Vite frontend separately; this image contains no browser UI.
# HF Spaces (sdk: docker) routes traffic to $PORT, default 7860.
FROM python:3.11-slim
FROM python:3.12.14-slim
COPY --from=ghcr.io/astral-sh/uv:0.12.5 /uv /uvx /bin/
ENV UV_LINK_MODE=copy \
UV_PYTHON_DOWNLOADS=never \
PATH="/app/s2s-client/.venv/bin:$PATH"
WORKDIR /app/s2s-client
COPY s2s-client/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY s2s-client/pyproject.toml s2s-client/uv.lock ./
RUN uv sync --locked --no-dev --no-install-project
COPY s2s-client/ .
COPY s2s-client/README.md s2s-client/server.py ./
COPY s2s-client/s2s_client/ ./s2s_client/
COPY docs/ /app/docs/
RUN uv sync --locked --no-dev
EXPOSE 7860
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
CMD ["uvicorn", "s2s_client.main:app", "--host", "0.0.0.0", "--port", "7860"]