Spaces:
Running
Running
| # Use an official Python base image | |
| FROM python:3.10 | |
| # Set working directory | |
| WORKDIR /app | |
| # Install system dependencies required by Chromium and Playwright | |
| RUN apt-get update && apt-get install -y \ | |
| wget \ | |
| libnss3 \ | |
| libatk1.0-0 \ | |
| libatk-bridge2.0-0 \ | |
| libcups2 \ | |
| libdbus-1-3 \ | |
| libxkbcommon0 \ | |
| libxcomposite1 \ | |
| libxrandr2 \ | |
| libxdamage1 \ | |
| libxfixes3 \ | |
| libpango-1.0-0 \ | |
| libpangocairo-1.0-0 \ | |
| libasound2 \ | |
| libxshmfence1 \ | |
| libgbm1 \ | |
| libgtk-3-0 \ | |
| && apt-get clean | |
| # Copy requirements | |
| COPY requirements.txt /app/requirements.txt | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r /app/requirements.txt | |
| # Install Playwright browsers (Chromium) | |
| RUN playwright install --with-deps chromium | |
| # Copy your entire app into the container | |
| COPY . /app | |
| # Expose port if you add a UI (e.g., Gradio) | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] | |