Spaces:
Runtime error
Runtime error
| # Use Python 3.10 slim base image | |
| FROM python:3.10-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Install essential tools + HTTPS support | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| ca-certificates \ | |
| curl \ | |
| gnupg \ | |
| lsb-release \ | |
| wget \ | |
| unzip \ | |
| xz-utils \ | |
| apt-transport-https \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Add Google Chrome repo | |
| RUN mkdir -p /etc/apt/keyrings \ | |
| && curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /etc/apt/keyrings/google-chrome.gpg \ | |
| && echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list | |
| # Install Chrome + required libraries (REMOVED libgconf-2-4) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| google-chrome-stable \ | |
| libglib2.0-0 \ | |
| libnss3 \ | |
| libfontconfig1 \ | |
| libx11-6 \ | |
| libx11-xcb1 \ | |
| libxcb1 \ | |
| libxcomposite1 \ | |
| libxcursor1 \ | |
| libxdamage1 \ | |
| libxext6 \ | |
| libxfixes3 \ | |
| libxi6 \ | |
| libxrandr2 \ | |
| libxrender1 \ | |
| libxtst6 \ | |
| fonts-liberation \ | |
| libappindicator3-1 \ | |
| libasound2 \ | |
| libatk-bridge2.0-0 \ | |
| libatk1.0-0 \ | |
| libcups2 \ | |
| libdbus-1-3 \ | |
| libdrm2 \ | |
| libgbm1 \ | |
| libgtk-3-0 \ | |
| libnspr4 \ | |
| libpango-1.0-0 \ | |
| libxss1 \ | |
| xdg-utils \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install Python deps | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy app | |
| COPY . . | |
| # Expose port | |
| EXPOSE 7860 | |
| # Run app — Hugging Face Spaces ignores EXPOSE and CMD port, but we keep for clarity | |
| CMD ["python", "app.py"] |