-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (19 loc) · 806 Bytes
/
Dockerfile
File metadata and controls
26 lines (19 loc) · 806 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
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
TRACES_DIR=/data/traces
WORKDIR /app
COPY pyproject.toml README.md /app/
COPY micro_agent /app/micro_agent
COPY evals /app/evals
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir --upgrade pip && \
pip install -e . && \
pip install --no-cache-dir uvicorn
RUN mkdir -p /data/traces
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD ["python", "-c", "import sys,urllib.request; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8000/healthz', timeout=3).status==200 else 1)"]
CMD ["uvicorn", "micro_agent.server:app", "--host", "0.0.0.0", "--port", "8000"]