agentic-triage-amd / Dockerfile
OGrohit's picture
Phase 4: Add HuggingFace Spaces deployment (Groq fallback, static UI, /run_pipeline endpoint, Dockerfile non-root user)
569851b
Raw
History Blame Contribute Delete
556 Bytes
FROM python:3.11-slim
# HuggingFace requires non-root user
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Copy requirements first (layer caching)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Install curl for healthchecks
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
# Copy source
COPY . .
# Give ownership to appuser
RUN chown -R appuser:appuser /app
USER appuser
# HuggingFace Spaces uses port 7860
EXPOSE 7860
CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]