Spaces:
Paused
Paused
File size: 697 Bytes
0e17b96 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # HuggingFace Space (Docker SDK) for the clean-read x402 endpoint.
# Free, no credit card, stable URL. Sleeps after ~48h idle, wakes on request.
FROM python:3.11-slim
WORKDIR /app
ENV PYTHONUNBUFFERED=1 PORT=7860
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY scripts ./scripts
EXPOSE 7860
# --proxy-headers + trust all forwarders so the x402 `resource` URL is built as
# https:// (HF terminates TLS at its proxy and forwards plain http internally);
# a scheme mismatch can make strict x402 verifiers reject the payment.
CMD ["uvicorn", "scripts.clean_read_api.main:app", "--host", "0.0.0.0", "--port", "7860", "--proxy-headers", "--forwarded-allow-ips", "*"]
|