Spaces:
Sleeping
Sleeping
File size: 915 Bytes
a8febb3 57d2d00 11e1abe 57d2d00 a8febb3 57d2d00 a8febb3 57d2d00 a8febb3 57d2d00 bdea127 a8febb3 57d2d00 a8febb3 bdea127 57d2d00 |
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
FROM python:3.10-slim
# Required to avoid some interactive prompts or issues
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
wget \
gnupg \
unzip \
fonts-liberation \
libnss3 \
libxss1 \
libasound2 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libgtk-3-0 \
libdrm2 \
libgbm1 \
libxcomposite1 \
libxrandr2 \
libxdamage1 \
libxfixes3 \
libx11-xcb1 \
libxrender1 \
libxtst6 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Copy and install Python requirements
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Install Playwright with browser binaries
RUN playwright install chromium
COPY . .
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|