ThreadStory_BYAI / Dockerfile
Reshama's picture
Update Dockerfile
a0d00b3 verified
raw
history blame contribute delete
593 Bytes
FROM python:3.9
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY --chown=user . /app
# Install Flask
RUN pip install flask gunicorn pymupdf tiktoken
# Expose default port
EXPOSE 7860
# Run with Gunicorn (Flask / WSGI) — allow $PORT expansion
CMD ["sh", "-c", "gunicorn app:app \
--bind 0.0.0.0:${PORT:-7860} \
--workers 1 --threads 4 --timeout 180 \
--access-logfile - --error-logfile - --log-level debug --preload"]