Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| wget \ | |
| gnupg \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements first to leverage cache | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Install Playwright and browsers | |
| RUN playwright install --with-deps chromium | |
| # Copy the rest of the application | |
| COPY . . | |
| # Set environment variables | |
| ENV PYTHONPATH=/app | |
| ENV PYTHONUNBUFFERED=1 | |
| # Expose port 7860 for Gradio | |
| EXPOSE 7860 | |
| # Run the application | |
| CMD ["python", "app.py"] | |