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:
+5
-2
@@ -68,8 +68,11 @@ WORKDIR /app
|
||||
COPY pyproject.toml uv.lock* ./
|
||||
|
||||
# Install deps natively so the venv targets this image's Python
|
||||
RUN pip install --no-cache-dir --upgrade uv==0.11.31 \
|
||||
&& uv sync --frozen --no-dev --no-install-project
|
||||
# (Playwright Noble ships uv via entrypoint shim but not in PATH)
|
||||
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 . .
|
||||
|
||||
Reference in New Issue
Block a user