Install uv via curl in worker stage

The Playwright Noble image ships Python but not pip or uv in PATH.
Install uv directly via curl, then run uv sync natively so the venv
targets this image's Python 3.12 instead of copying a broken 3.11 venv.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2026-08-04 21:48:34 +03:30
parent 82cf4f1f82
commit 47fa0229b3
+5 -2
View File
@@ -68,8 +68,11 @@ WORKDIR /app
COPY pyproject.toml uv.lock* ./ COPY pyproject.toml uv.lock* ./
# Install deps natively so the venv targets this image's Python # Install deps natively so the venv targets this image's Python
RUN pip install --no-cache-dir --upgrade uv==0.11.31 \ # (Playwright Noble ships uv via entrypoint shim but not in PATH)
&& uv sync --frozen --no-dev --no-install-project RUN curl -LsSf https://astral.sh/uv/install.sh | sh 2>&1
ENV PATH="/root/.local/bin:$PATH"
RUN uv sync --frozen --no-dev --no-install-project
# Copy app code (busts cache on code changes, not deps) # Copy app code (busts cache on code changes, not deps)
COPY . . COPY . .