Spaces:
Runtime error
Runtime error
| # βββ Hugging Face Spaces Dockerfile ββββββββββββββββββββββ | |
| # Build: docker build -t wellfound-ai . | |
| # Run: docker run -p 7860:7860 wellfound-ai | |
| # | |
| # HF Spaces auto-detects Dockerfile and builds on push. | |
| # The Space proxies port 7860 to your public URL. | |
| FROM python:3.11-slim | |
| # ββ System metadata (HF Spaces standard) ββ | |
| LABEL org.opencontainers.image.title="Wellfound AI" | |
| LABEL org.opencontainers.image.description="AI-powered Excel data completion for Wellfound exports" | |
| WORKDIR /app | |
| # ββ Layer 1: System dependencies (cached unless changed) ββ | |
| # Playwright needs these for headless Chromium in containers | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| curl \ | |
| wget \ | |
| ca-certificates \ | |
| fonts-liberation \ | |
| libasound2 \ | |
| libatk-bridge2.0-0 \ | |
| libatk1.0-0 \ | |
| libcairo2 \ | |
| libcups2 \ | |
| libdbus-1-3 \ | |
| libdrm2 \ | |
| libgbm1 \ | |
| libglib2.0-0 \ | |
| libnspr4 \ | |
| libnss3 \ | |
| libpango-1.0-0 \ | |
| libxcomposite1 \ | |
| libxdamage1 \ | |
| libxfixes3 \ | |
| libxkbcommon0 \ | |
| libxrandr2 \ | |
| xdg-utils \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # ββ Layer 2: Python dependencies (cached unless requirements change) ββ | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # ββ Layer 3: Playwright browser (separate - heavy but unchanged often) ββ | |
| RUN python -m playwright install chromium && \ | |
| python -m playwright install-deps chromium | |
| # ββ Layer 4: Application code (changes most often) ββ | |
| COPY app.py . | |
| COPY core/ ./core/ | |
| COPY templates/ ./templates/ | |
| COPY static/ ./static/ | |
| # ββ Runtime setup ββ | |
| RUN mkdir -p data/uploads data/results data/checkpoints | |
| # HF Spaces proxies port 7860 by default | |
| EXPOSE 7860 | |
| # Environment defaults | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| # Health check (HF Spaces uses this for status indicator) | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ | |
| CMD curl -f http://localhost:7860/api/health || exit 1 | |
| CMD ["python", "app.py"] | |