File size: 748 Bytes
f7359ad
e47882f
f7359ad
e47882f
 
 
f7359ad
 
 
 
 
 
 
bf9fe77
e47882f
f7359ad
 
e47882f
f7359ad
 
 
09bde96
f7359ad
 
 
 
 
e47882f
 
 
f7359ad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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"]