-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.api
More file actions
34 lines (25 loc) · 962 Bytes
/
Copy pathDockerfile.api
File metadata and controls
34 lines (25 loc) · 962 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
30
31
32
33
34
# Dockerfile.api
# FastAPI multi-agent system container.
# Ollama runs on the HOST Mac (M1 Metal GPU) — this container calls it
# via host.docker.internal:11434. Do NOT run Ollama inside this container.
FROM python:3.11-slim
# System deps
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python deps first (layer cache — only rebuilds when requirements change)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy source
COPY src/ ./src/
COPY config/ ./config/
COPY data/ ./data/
# Runtime dirs (storage is mounted as a volume in docker-compose)
RUN mkdir -p storage/chroma storage/logs
# Disable ChromaDB telemetry inside container
ENV ANONYMIZED_TELEMETRY=false
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
EXPOSE 8000
CMD ["uvicorn", "src.api.main:app", "--host", "0.0.0.0", "--port", "8000"]