Spaces:
Paused
Paused
File size: 1,033 Bytes
1293e20 029a377 1293e20 029a377 1293e20 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | FROM python:3.12-slim
# System libraries required by headless Chromium
RUN apt-get update && apt-get install -y --no-install-recommends \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libxcb1 \
libxkbcommon0 \
libatspi2.0-0 \
libx11-6 \
libxcomposite1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxrandr2 \
libgbm1 \
libcairo2 \
libpango-1.0-0 \
libnss3 \
libnspr4 \
libasound2t64 \
libdbus-1-3 \
fonts-liberation \
&& rm -rf /var/lib/apt/lists/*
# HF Spaces runs as non-root user with UID 1000
RUN useradd -m -u 1000 user || true
WORKDIR /app
# Install Python package (includes cloakbrowser + playwright)
COPY pyproject.toml .
COPY src/ src/
RUN pip install --no-cache-dir .
# Pre-download CloakBrowser Chromium binary as runtime user
USER 1000
RUN python -c "from cloakbrowser import ensure_binary; ensure_binary()"
EXPOSE 7860
CMD ["python", "-m", "veilrender"]
|