Spaces:
Sleeping
Sleeping
File size: 737 Bytes
a8febb3 bdea127 a8febb3 bdea127 a8febb3 bdea127 a8febb3 bdea127 a8febb3 bdea127 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 |
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
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Install Playwright and Chromium browser (CRITICAL)
RUN playwright install chromium
# Copy app code
COPY . /app
WORKDIR /app
# Start the FastAPI server
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|