Spaces:
Sleeping
Sleeping
File size: 756 Bytes
e31934d 83fe205 e31934d 83fe205 e31934d 83fe205 e31934d 83fe205 | 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 | FROM python:3.11-slim
# Install system dependencies for Playwright
RUN apt-get update && apt-get install -y \
wget \
libnss3 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libxkbcommon0 \
libxcomposite1 \
libxdamage1 \
libxrandr2 \
libgbm1 \
libpango-1.0-0 \
libcairo2 \
libasound2 \
libxshmfence1 \
&& rm -rf /var/lib/apt/lists/*
# Install python packages and playwright
RUN pip install --no-cache-dir playwright && playwright install chromium
# App folder
WORKDIR /app
COPY . /app
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# HuggingFace requires port 7860
EXPOSE 7860
# Start FastAPI app
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|