MuleGuard / Dockerfile
MuleGuard
Redesign dashboard: fraud-ops command-center UI (dark, signal-coded)
5164b3b
Raw
History Blame Contribute Delete
983 Bytes
# MuleGuard — HuggingFace Docker Space
# Runs the FastAPI scoring backend (port 8000, internal) + Streamlit analyst
# console (port 7860, exposed). The dashboard talks to the backend live.
FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
HF_HOME=/tmp/hf \
MPLCONFIGDIR=/tmp/mpl \
MULEGUARD_API=http://127.0.0.1:8000
# libgomp1 is required by LightGBM.
RUN apt-get update && apt-get install -y --no-install-recommends libgomp1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
# App code + artifacts (model, pipeline, sample, figures, pre-scored alerts).
COPY .streamlit ./.streamlit
COPY src ./src
COPY dashboard ./dashboard
COPY artifacts ./artifacts
COPY reports ./reports
COPY docs ./docs
COPY start.sh .
# HF Spaces run as uid 1000; make runtime dirs writable.
RUN chmod +x start.sh && mkdir -p /tmp/hf /tmp/mpl && chmod -R 777 /tmp/hf /tmp/mpl
EXPOSE 7860
CMD ["./start.sh"]