dgx-spark-playbooks/community/litguard/Dockerfile
prashantkul 78213ac8a8 Add LitGuard playbook: prompt injection detection on DGX Spark
LitServe-based prompt injection detection server with a React monitoring
dashboard. Serves HuggingFace classification models behind an
OpenAI-compatible API with real-time metrics and GPU acceleration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 21:36:27 -07:00

30 lines
575 B
Docker

# Stage 1: Build React UI
FROM node:20-slim AS ui-build
WORKDIR /app/ui
COPY ui/package.json ui/package-lock.json* ./
RUN npm install
COPY ui/ ./
RUN npm run build
# Stage 2: Python backend + static UI
FROM python:3.12-slim
WORKDIR /app
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
# Install Python dependencies
COPY pyproject.toml ./
RUN uv pip install --system -e .
# Copy backend source
COPY src/ ./src/
COPY config.yaml ./
# Copy built UI
COPY --from=ui-build /app/ui/dist ./ui/dist
EXPOSE 8234
CMD ["python", "-m", "src.server.app"]