feat(ml): add isolated embeddings service and scoped client

This commit is contained in:
Anya Tokugawa committed 2026-11-30 23:03:13 +09:00
1 parent 46c185d928
commit 0c7897d695
13 files changed
+1112

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
FROM python:3.12-slim-bookworm
ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1 PYTHONHASHSEED=0 \
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 MKL_NUM_THREADS=1
WORKDIR /app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY pages_ml.py train.py ./
USER 65532:65532
EXPOSE 8010
CMD ["gunicorn", "--bind", "0.0.0.0:8010", "--workers", "1", "--worker-class", "gthread", "--threads", "2", "--timeout", "60", "--worker-tmp-dir", "/tmp", "--no-control-socket", "--limit-request-line", "1024", "--limit-request-fields", "30", "pages_ml:create_app()"]