Spaces:
Running
Running
File size: 470 Bytes
924fd67 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | FROM python:3.12-slim
WORKDIR /app
RUN addgroup --system app && adduser --system --group app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt && \
rm -rf /root/.cache/pip
COPY . .
USER app
EXPOSE 7860
ENV FLASK_ENV=production \
PORT=7860 \
HOST=0.0.0.0 \
LOG_LEVEL=INFO \
PYTHONUNBUFFERED=1
CMD ["gunicorn", "-w", "2", "-b", "0.0.0.0:7860", "--timeout", "300", "--access-logfile", "-", "--error-logfile", "-", "webapp:app"]
|