File size: 723 Bytes
a8febb3
 
bdea127
11e1abe
 
 
 
 
 
a8febb3
bdea127
a8febb3
 
 
11e1abe
bdea127
a8febb3
bdea127
a8febb3
 
 
11e1abe
a8febb3
 
bdea127
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
FROM python:3.10-slim

# Install system dependencies required by Playwright
RUN apt-get update && apt-get install -y \
    wget curl gnupg unzip libglib2.0-0 libnss3 libgconf-2-4 \
    libfontconfig1 libxss1 libasound2 libxtst6 libx11-xcb1 \
    libxcomposite1 libxcursor1 libxdamage1 libxrandr2 libxext6 \
    libxfixes3 libx11-6 libxcb1 libxinerama1 libpango-1.0-0 \
    libcairo2 libatk-bridge2.0-0 libgtk-3-0 libgbm1

# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Install Playwright browser binaries
RUN playwright install chromium

# Copy app code
COPY . /app
WORKDIR /app

# Run the app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]