Bundled MAP_PROMPT/SUMMARY_PROMPT from the customer1 deepseek configmap. Env wins over prompt files; blank compose injection is treated as unset. Parser maps market_overview JSON onto the dashboard ticker/map contract.
25 lines
742 B
Docker
25 lines
742 B
Docker
FROM python:3.11-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
WORKDIR /app
|
|
|
|
# libpq-dev + gcc for psycopg2 build/adapters; keep the image lean.
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
libpq-dev gcc \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY intel.py nous_client.py prompts.py summarizer.py run_news_summarizer.py ./
|
|
COPY prompt_files ./prompt_files
|
|
|
|
# Security: run as a non-privileged user.
|
|
RUN useradd -m summarizer_user
|
|
USER summarizer_user
|
|
|
|
# Default: single pass (as the old k8s CronJob ran). The compose service
|
|
# overrides `command` to the scheduler loop (run_news_summarizer.py).
|
|
CMD ["python", "summarizer.py"]
|