legalsync / Dockerfile
AnthropicallyHuggingFaces's picture
Add Dockerfile (Workload API compliant, port 7860)
799641d verified
Raw History Blame Contribute Delete
1.35 kB
# LegalSync — DataRobot Workload API compliant (any HTTP container)
# Docker SDK Hugging Face Space — serves the FastAPI workload on port 7860.
#
# Requirement per docs.datarobot.com: the Workload API works with any container
# that listens on HTTP — deploy agent services, model inference, RAG pipelines,
# MCP servers and custom apps as governed Workloads.
FROM python:3.11-slim
WORKDIR /app
# ffmpeg/libsndfile kept for the whisper pipeline; curl for the healthcheck
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg libsndfile1 curl \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# LegalSync app (single source of truth: config/ is authoritative)
COPY config/ ./config/
COPY services/ ./services/
COPY schemas/ ./schemas/
COPY api/ ./api/
COPY docs/ ./docs/
COPY scripts/ ./scripts/
COPY workload_app.py .
# AI platform registry (900-registry YAMLs)
COPY ai-platform/ ./ai-platform/
ENV PORT=7860
ENV PYTHONPATH=/app
ENV PYTHONUNBUFFERED=1
EXPOSE 7860
# Health check for the Workload readiness probe + canary smoke test
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -fsS http://localhost:7860/health || exit 1
CMD ["uvicorn", "workload_app:app", "--host", "0.0.0.0", "--port", "7860"]