AccessibilityToolkit / Dockerfile
Claude
Make the app deployable as a Hugging Face Docker Space
36dd4d2 unverified
Raw History Blame Contribute Delete
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"]