Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # 1. Install system dependencies | |
| # build-essential: helps if any python packages need to compile C extensions | |
| # wget/gnupg: for playwright setup | |
| RUN apt-get update && apt-get install -y \ | |
| wget \ | |
| gnupg \ | |
| build-essential \ | |
| libmagic1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 2. Copy requirements and install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 3. Install Playwright browsers (Chromium) | |
| RUN playwright install chromium | |
| RUN playwright install-deps | |
| # 4. Copy the app code | |
| COPY . . | |
| # 5. Expose the port Hugging Face expects (7860) | |
| EXPOSE 7860 | |
| # 6. Command to run the app | |
| CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.port=7860"] | |