-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (28 loc) · 1.07 KB
/
Dockerfile
File metadata and controls
41 lines (28 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Stage 1: Build dependencies with uv
# Use official lightweight uv image
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS builder
WORKDIR /app
# Copy dependency files first (layer caching)
COPY pyproject.toml uv.lock ./
# Install dependencies into a standalone venv, no project install yet
RUN uv sync --frozen --no-install-project --no-dev
# Copy the rest of the project and install it
COPY . .
RUN uv sync --frozen --no-dev
# Stage 2: Lean runtime image
FROM python:3.12-slim
WORKDIR /app
# Copy the venv (installed packages) from builder
COPY --from=builder /app/.venv /app/.venv
# Copy only the runtime source files
COPY main.py tools_catalogue.py utilities.py start.sh ./
COPY gh_agent/ ./gh_agent/
# Use the venv's Python directly — no uv needed at runtime
ENV PATH="/app/.venv/bin:$PATH"
# Expose ports 8000 (FastAPI) & 8001 (ADK Web UI)
EXPOSE 8000 8001
# Make the startup script executable
RUN chmod +x start.sh
# Run start.sh to launch both processes in parallel & then monitor.
# If either crashes, the script exits and Kubernetes restarts the pod.
CMD ["./start.sh"]