Prediction / Dockerfile
Rivalcoder
Use of Playright
4df9bca
raw
history blame
547 Bytes
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies required by Playwright
RUN apt-get update && apt-get install -y \
libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 \
libx11-xcb1 libxcomposite1 libxdamage1 libxrandr2 libgbm1 \
libpango-1.0-0 libpangocairo-1.0-0 libasound2 fonts-liberation \
libglib2.0-0 libdrm2 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]