ArthurZ's picture
ArthurZ HF Staff
wire /bisect endpoint + auto-clone transformers on first run
b021f63 verified
Raw
History Blame Contribute Delete
1.28 kB
# transformers integration-test failure triage — Hugging Face Space
#
# Build: docker build -t itft .
# Run: docker run --rm -p 7860:7860 -v $PWD/output:/app/output -e HF_TOKEN=... itft
#
# Resource expectations:
# - CPU is sufficient for the data pipeline (fetch + filter + render).
# - A GPU upgrade is only required if the optional local-bisect step
# (`bisect.py`) is invoked. The default refresh skips it.
FROM python:3.12-slim
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
HF_HOME=/data/.hf_cache
# git is needed both for huggingface_hub (LFS / commit creation) and for the
# optional bisect step.
RUN apt-get update -qq && apt-get install -y --no-install-recommends \
git ca-certificates && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install --upgrade pip && pip install -r /app/requirements.txt
COPY app /app/app
COPY README.md /app/README.md
RUN mkdir -p /app/output
# Refresh on container start, then loop every 6h while serving the static page.
# `python -m http.server` is fine here; the page is static (no Python at
# request-time). The refresh runs in the background.
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
EXPOSE 7860
ENTRYPOINT ["/app/entrypoint.sh"]