Spaces:
Sleeping
Sleeping
Download Dockerfile from joemartis/AccessibilityToolkit: direct link, hf CLI and curl.
- Browser
- Download file 726 Bytes
-
https://huggingface.co/spaces/joemartis/AccessibilityToolkit/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/joemartis/AccessibilityToolkit/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/joemartis/AccessibilityToolkit/resolve/main/Dockerfile
726 Bytes
| # Hugging Face Spaces-compatible image (SDK: docker, app_port: 8000). | |
| FROM python:3.12-slim | |
| # pikepdf needs QPDF; lxml needs libxml2/libxslt. Installed as root at build. | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends \ | |
| qpdf \ | |
| libxml2 \ | |
| libxslt1.1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Run as a non-root user (Hugging Face Spaces best practice). | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| COPY requirements.txt ./ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY --chown=user backend ./backend | |
| COPY --chown=user frontend ./frontend | |
| COPY --chown=user tools ./tools | |
| USER user | |
| EXPOSE 8000 | |
| CMD ["uvicorn", "backend.app.main:app", "--host", "0.0.0.0", "--port", "8000"] | |