Spaces:
Paused
Paused
File size: 760 Bytes
631ec46 3a4db54 1e587fa 631ec46 3a4db54 0e73ca4 3a4db54 0e73ca4 631ec46 0e73ca4 631ec46 0e73ca4 631ec46 0e73ca4 1e587fa 631ec46 3a4db54 631ec46 3a4db54 631ec46 3a4db54 76e1db4 | 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 | FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Install system dependencies for Playwright
RUN apt-get update && apt-get install -y \
curl wget gnupg unzip \
fonts-liberation libnss3 libatk1.0-0 libatk-bridge2.0-0 \
libcups2 libxcomposite1 libxdamage1 libxrandr2 libgbm1 \
libasound2 libpangocairo-1.0-0 libxshmfence1 libxss1 libgtk-3-0 \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Install Playwright browsers
RUN playwright install --with-deps
# Copy application code
COPY app/ /app/app/
# Expose port for FastAPI
EXPOSE 7860
# Start the FastAPI server
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|