Qua / Dockerfile
xjackkx's picture
Upload 2 files
bf9fe77 verified
Raw History Blame Contribute Delete
748 Bytes
FROM python:3.11-slim
WORKDIR /app
ENV PYTHONUNBUFFERED=1
# Install native Debian Chromium + runtime fonts & ca-certificates
# Clean apt archives immediately to prevent deb bloat in image layers
RUN apt-get update && apt-get install -y --no-install-recommends \
chromium \
fonts-liberation \
ca-certificates \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Download Playwright browser binaries — required for browser engine
RUN python -m pip install --upgrade pip && \
python -m playwright install chromium
COPY app.py .
ENV HOST=0.0.0.0
ENV PORT=7860
ENV ENGINE=browser
EXPOSE 7860
CMD ["python", "app.py"]