diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..eb4e1c4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM python:3.12-slim + +WORKDIR /app +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt +COPY app/ ./app/ + +EXPOSE 8095 + +# When running standalone, override these to point at your Prometheus/Alertmanager +ENV MARVIS_PROMETHEUS_URL=http://127.0.0.1:9090 +ENV MARVIS_PROMETHEUS_PREFIX=/prometheus +ENV MARVIS_ALERTMANAGER_URL=http://127.0.0.1:9093 +ENV MARVIS_AI_MODE=rule +# MARVIS_AI_MODE=openai → set MARVIS_OPENAI_API_KEY +# MARVIS_AI_MODE=ollama → set MARVIS_OLLAMA_URL + MARVIS_OLLAMA_MODEL + +CMD ["python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8095"] diff --git a/Dockerfile.ueransim b/Dockerfile.ueransim new file mode 100644 index 0000000..71d25fd --- /dev/null +++ b/Dockerfile.ueransim @@ -0,0 +1,21 @@ +FROM ubuntu:22.04 +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential cmake git \ + libsctp-dev lksctp-tools \ + iproute2 iputils-ping \ + && rm -rf /var/lib/apt/lists/* + +RUN git config --global http.sslVerify false \ + && git clone --depth 1 https://github.com/aligungr/UERANSIM /ueransim \ + && cmake -S /ueransim -B /ueransim/build -DCMAKE_BUILD_TYPE=Release \ + && cmake --build /ueransim/build --parallel $(nproc) \ + && cp /ueransim/build/nr-gnb /usr/local/bin/ \ + && cp /ueransim/build/nr-ue /usr/local/bin/ \ + && rm -rf /ueransim + +COPY config/run-test.sh /run-test.sh +RUN chmod +x /run-test.sh + +ENTRYPOINT ["/bin/bash", "/run-test.sh"] diff --git a/README.md b/README.md index 5163648..885c29e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,325 @@ -# p5g-marvis +# P5G Marvis — Full Setup Guide +This document describes the complete architecture and deployment procedure for the +**P5G Marvis** sidebar extension that injects custom pages into the Athonet NCM UI. + +--- + +## Architecture Overview + +``` +Browser → Traefik (HTTPS :443) + ├── /core/marvis/* → strip prefix → http://127.0.0.1:8100 (p5g-marvis FastAPI) + └── /core/radio/* → strip prefix → http://127.0.0.1:4000 (rm-ui, if present) + +NCM UI (React SPA) + └── index-Cw8Irsq8.js (patched by patch-ncm.py) + ├── Sidebar: P5G Marvis (Insights, Actions, Minis, AI) + P5G Radio + ├── Router: /marvis/* and /radio/* →