Add activity-core LLM endpoint support
This commit is contained in:
parent
1d9fc107ed
commit
14ba47c129
25 changed files with 2082 additions and 18 deletions
27
Containerfile
Normal file
27
Containerfile
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue