-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 843 Bytes
/
Dockerfile
File metadata and controls
29 lines (22 loc) · 843 Bytes
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
# 1. Use an official lightweight Python image
FROM python:3.11-slim
# 2. Set the working directory to root
WORKDIR /code
# 3. Standard Python environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# This ensures 'app', 'agents', and 'tools' are all discoverable
ENV PYTHONPATH=/code
# 4. Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends gcc && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# 5. Copy and install requirements
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# 6. Copy the entire project (including tools/ and agents/)
COPY . .
# 8. Use the PORT environment variable provided by Cloud Run
ENV PORT=8080
EXPOSE 8080
CMD uvicorn app.main:app --host 0.0.0.0 --port ${PORT:-8080}