Spaces:
Sleeping
Sleeping
| 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"] | |