decision-model / Dockerfile
xstard's picture
Implement encoder-only bilingual decision API and demo
4df9b63 verified
Raw History Blame Contribute Delete
751 Bytes
FROM python:3.13-slim
ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1 \
GRADIO_ANALYTICS_ENABLED=False HF_HUB_DISABLE_TELEMETRY=1 \
HF_HOME=/home/user/.cache/huggingface DECISION_MODEL_HOME=/app OMP_NUM_THREADS=2
RUN useradd -m -u 1000 user
WORKDIR /app
COPY requirements.txt ./
RUN pip install --no-cache-dir torch==2.11.0 --index-url https://download.pytorch.org/whl/cpu \
&& pip install --no-cache-dir -r requirements.txt
COPY --chown=user:user pyproject.toml README.md ./
COPY --chown=user:user src ./src
COPY --chown=user:user app.py ./
RUN pip install --no-cache-dir --no-deps . && chown -R user:user /app
USER user
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1", "--no-access-log"]