-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (22 loc) · 861 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (22 loc) · 861 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
FROM python:3.11-slim AS base
ARG VERTICAL=finance
WORKDIR /app
# Copy project files for install
COPY pyproject.toml README.md ./
COPY src/ src/
# Install package and dependencies
RUN pip install --no-cache-dir . && rm -rf /root/.cache
# Copy policies and model artifacts
COPY policies/ policies/
COPY dist/ dist/
# Default paths — override per vertical
ENV POLICY_PATH=policies/${VERTICAL}.json
ENV MODEL_PATH=dist/${VERTICAL}/model.onnx
ENV TOKENIZER_PATH=dist/${VERTICAL}/tokenizer
ENV CALIBRATION_PATH=dist/${VERTICAL}/calibration_params.json
ENV HOST=0.0.0.0
ENV PORT=8080
EXPOSE 8080
HEALTHCHECK --interval=10s --timeout=3s --start-period=10s \
CMD python -c "import httpx; httpx.get('http://localhost:8080/health').raise_for_status()"
CMD ["uvicorn", "intentguard.server:app", "--host", "0.0.0.0", "--port", "8080", "--log-level", "info"]