Workhub / Dockerfile
ag235772's picture
files Replacement
e298636
Raw History Blame Contribute Delete
648 Bytes
FROM python:3.12-slim
# Hugging Face Spaces runs containers as UID 1000 and routes traffic to port 7860
RUN useradd -m -u 1000 user
USER user
ENV PATH=/home/user/.local/bin:$PATH \
HUB_SERVER_DATA=/home/user/data \
PORT=7860
WORKDIR /home/user/app
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY --chown=user server ./server
COPY --chown=user static ./static
RUN mkdir -p /home/user/data
EXPOSE 7860
# --timeout 90 > GROQ_TIMEOUT (45s) so slow AI calls are not killed by gunicorn's 30s default
CMD ["gunicorn", "--chdir", "server", "-w", "2", "--timeout", "90", "-b", "0.0.0.0:7860", "app:app"]