-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (36 loc) · 1.4 KB
/
Copy pathDockerfile
File metadata and controls
49 lines (36 loc) · 1.4 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
42
43
44
45
46
47
48
49
FROM python:3.12-slim AS builder
WORKDIR /build
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential git \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --upgrade pip \
&& pip install --prefix=/install \
torch==2.2.0+cpu \
--index-url https://download.pytorch.org/whl/cpu \
&& pip install --prefix=/install -r requirements.txt \
&& pip install --prefix=/install mcp==1.0.0
FROM python:3.12-slim AS runtime
LABEL org.opencontainers.image.title="TraceOps" \
org.opencontainers.image.description="Hallucination-aware HDFS log analysis agent" \
org.opencontainers.image.source="https://github.com/your-org/traceops"
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PYTHONPATH=/app \
TRACEOPS_LLM_PROVIDER=ollama \
TRACEOPS_LLM_MODEL=mistral \
TRACEOPS_MAX_LINES=50000
WORKDIR /app
COPY --from=builder /install /usr/local
RUN apt-get update && apt-get install -y --no-install-recommends \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
COPY src/ ./src/
COPY config.py ./config.py
COPY main.py ./main.py
VOLUME ["/app/data", "/app/outputs", "/root/.cache/huggingface"]
ENTRYPOINT ["python", "-m", "src.mcp_server.server"]
CMD []
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
CMD python -c "from src.confidence.scorer import ConfidenceScorer; print('ok')" \
|| exit 1