Spaces:
Runtime error
Runtime error
Download Dockerfile from BNAmericas/ComparerTool: direct link, hf CLI and curl.
- Browser
- Download file 1.39 kB
-
https://huggingface.co/spaces/BNAmericas/ComparerTool/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/BNAmericas/ComparerTool/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/BNAmericas/ComparerTool/resolve/main/Dockerfile
1.39 kB
| # BNA Comparator Web — Hugging Face Spaces Docker image | |
| # Simple deployment: Streamlit + Playwright Chromium. | |
| # Researchers connect via the in-app 3-tier gate: paste cookies / paste | |
| # cookies after sign-in / email+password fallback. | |
| FROM python:3.12-slim | |
| # System deps for Playwright Chromium (no GPU, no display server needed). | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| wget gnupg ca-certificates fonts-liberation \ | |
| libglib2.0-0 libnss3 libnspr4 libdbus-1-3 \ | |
| libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 \ | |
| libatspi2.0-0 libx11-6 libxcb1 libxcomposite1 libxdamage1 libxext6 \ | |
| libxfixes3 libxrandr2 libgbm1 libxss1 libasound2 \ | |
| libpango-1.0-0 libpangocairo-1.0-0 libcairo2 libxshmfence1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Hugging Face Spaces runs as a non-root user (uid 1000). Match it. | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH | |
| WORKDIR /home/user/app | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip \ | |
| && pip install --no-cache-dir -r requirements.txt \ | |
| && python -m playwright install chromium | |
| COPY --chown=user . . | |
| EXPOSE 7860 | |
| ENV STREAMLIT_SERVER_PORT=7860 STREAMLIT_SERVER_ADDRESS=0.0.0.0 \ | |
| STREAMLIT_BROWSER_GATHER_USAGE_STATS=false | |
| CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"] | |