Files
llm-connect/Containerfile
tegwick 14ba47c129
Some checks failed
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
Add activity-core LLM endpoint support
2026-06-07 19:24:45 +02:00

28 lines
765 B
Docker

FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
LLM_CONNECT_HOST=0.0.0.0 \
LLM_CONNECT_PORT=8080 \
LLM_CONNECT_PROVIDER=mock
WORKDIR /app
RUN groupadd -g 10001 llmconnect \
&& useradd -u 10001 -g 10001 -m -s /usr/sbin/nologin llmconnect
COPY pyproject.toml README.md ./
COPY llm_connect ./llm_connect
COPY fixtures ./fixtures
COPY scripts ./scripts
RUN pip install --no-cache-dir .
USER 10001:10001
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD python -c "import json, urllib.request; r=urllib.request.urlopen('http://127.0.0.1:8080/health', timeout=3); raise SystemExit(0 if json.load(r).get('status') == 'ok' else 1)"
CMD ["python", "-m", "llm_connect.server"]