Recap-shan / Dockerfile
mm125's picture
Rename Dockerfile (1) to Dockerfile
45f9423 verified
Raw
History Blame Contribute Delete
561 Bytes
FROM python:3.10-slim
RUN apt-get update && apt-get install -y \
ffmpeg \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
RUN useradd -m -u 1000 user && chown -R user:user /app
USER user
EXPOSE 7860
CMD ["gunicorn", "app:app", \
"--bind", "0.0.0.0:7860", \
"--workers", "1", \
"--timeout", "600", \
"--graceful-timeout", "60", \
"--keep-alive", "5", \
"--max-requests", "100", \
"--worker-class", "sync"]