Download Dockerfile from MB-IDK/HIBP2: direct link, hf CLI and curl.
- Browser
- Download file 4.06 kB
-
https://huggingface.co/spaces/MB-IDK/HIBP2/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/MB-IDK/HIBP2/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/MB-IDK/HIBP2/resolve/main/Dockerfile
4.06 kB
| # ╔══════════════════════════════════════════════════════════════╗ | |
| # ║ HIBP Pro Monitor — GOD TIER Dockerfile ║ | |
| # ║ Pin Bookworm = zéro surprise de package names ║ | |
| # ╚══════════════════════════════════════════════════════════════╝ | |
| FROM python:3.12-slim-bookworm | |
| # ────────────────────────────────────────────── | |
| # 1. Dépendances système Firefox/Camoufox + Xvfb | |
| # ────────────────────────────────────────────── | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libgtk-3-0 \ | |
| libasound2 \ | |
| libx11-xcb1 \ | |
| libdbus-glib-1-2 \ | |
| libdbus-1-3 \ | |
| libxt6 \ | |
| libxrender1 \ | |
| libxcomposite1 \ | |
| libxdamage1 \ | |
| libxrandr2 \ | |
| libxcursor1 \ | |
| libxi6 \ | |
| libxtst6 \ | |
| libpango-1.0-0 \ | |
| libcairo2 \ | |
| libcairo-gobject2 \ | |
| libgdk-pixbuf-2.0-0 \ | |
| libglib2.0-0 \ | |
| libfontconfig1 \ | |
| libfreetype6 \ | |
| libstdc++6 \ | |
| xvfb \ | |
| dbus \ | |
| dbus-x11 \ | |
| fonts-liberation \ | |
| ca-certificates \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && apt-get clean | |
| # ────────────────────────────────────────────── | |
| # 2. D-Bus setup | |
| # ────────────────────────────────────────────── | |
| RUN mkdir -p /run/dbus && dbus-uuidgen > /etc/machine-id | |
| # ────────────────────────────────────────────── | |
| # 3. User non-root (requis par HF Spaces) | |
| # ────────────────────────────────────────────── | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| # ────────────────────────────────────────────── | |
| # 4. Python deps + Camoufox browser fetch | |
| # ────────────────────────────────────────────── | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| RUN python -m camoufox fetch | |
| # ────────────────────────────────────────────── | |
| # 5. Code | |
| # ────────────────────────────────────────────── | |
| COPY --chown=user . /app | |
| # ────────────────────────────────────────────── | |
| # 6. Permissions cache Camoufox pour user | |
| # ────────────────────────────────────────────── | |
| RUN cp -r /root/.cache/camoufox /home/user/.cache/camoufox 2>/dev/null || true && \ | |
| chown -R user:user /home/user/.cache 2>/dev/null || true && \ | |
| chmod 1777 /tmp | |
| # ────────────────────────────────────────────── | |
| # 7. Runtime | |
| # ────────────────────────────────────────────── | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| PYTHONUNBUFFERED=1 \ | |
| PYTHONDONTWRITEBYTECODE=1 \ | |
| XDG_CACHE_HOME=/home/user/.cache | |
| EXPOSE 7860 | |
| CMD ["dbus-run-session", "python", "app.py"] |