Rename Dockerfile
This commit is contained in:
30
Dockerfile
Normal file
30
Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
FROM quay.ocp.banorte.com/golden/python-312:latest AS builder
|
||||
|
||||
COPY --from=ghcr.io/astral-sh/uv:0.7.12 /uv /uvx /bin/
|
||||
|
||||
ENV UV_COMPILE_BYTECODE=1 \
|
||||
UV_NO_CACHE=1 \
|
||||
UV_NO_DEV=1 \
|
||||
UV_LINK_MODE=copy
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies first (cached layer as long as lockfile doesn't change)
|
||||
COPY pyproject.toml uv.lock ./
|
||||
RUN uv sync --locked --no-install-project --no-editable
|
||||
|
||||
# Copy the rest of the project and install it
|
||||
COPY . .
|
||||
RUN uv sync --locked --no-editable
|
||||
|
||||
# --- Final stage: no uv, no build artifacts ---
|
||||
FROM quay.ocp.banorte.com/golden/python-312:latest
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/.venv /app/.venv
|
||||
COPY config.yaml ./
|
||||
|
||||
ENV PATH="/app/.venv/bin:$PATH"
|
||||
|
||||
CMD ["uvicorn", "va_agent.server:app", "--host", "0.0.0.0", "--port", "8080"]
|
||||
Reference in New Issue
Block a user