Skip to main content
ModPod is a standalone Python service. It does not depend on Kafka, Keycloak, or object storage — model artifacts and the model registry live on a local persistent volume.

Dependencies

ModPod is self-contained. It does not require any other FlowX infrastructure service to run.
  • Persistent volume — required for model artifacts and the SQLite registry
  • Identity provider — not used; authentication is a static bearer token
  • Kafka — not used
  • Object storage (S3/MinIO) — not used; models are stored on the mounted volume

Capabilities

  • Upload model packages as ZIP archives with a metadata.json manifest
  • Manage model registry (list, fetch, delete by name/version)
  • Load models into memory on demand
  • Run inference with SHAP-based top-factor explanations
  • Support for LightGBM (Booster text format) and Logistic Regression (scikit-learn, joblib-serialized)

Authentication

ModPod uses a static bearer token. Set the AUTHORIZATION_APIKEY environment variable and include the token on every request except the health check:
The API key is a static secret. Store it in a Kubernetes Secret (or equivalent) and never commit it to source control.

API endpoints

All endpoints are prefixed with /modpod.

Health

Model upload

The ZIP must contain a metadata.json file with name and version fields. Files are extracted to <MODPOD_MODELS_DIR>/<name>/<version>/.

Model registry

Inference

Predict request

Predict response


Supported model types

Both types produce SHAP-based top-factor explanations alongside the prediction. LightGBM uses the built-in pred_contrib output; Logistic Regression uses shap.LinearExplainer.

Model package structure

Model packages are uploaded as ZIP archives with the following layout:
The metadata.json file must contain at least name and version:

Environment variables

Authentication

Storage

Server

Recommended worker count is 1. Inference is CPU-bound and loaded models are held in per-process memory; additional workers multiply the memory footprint without increasing throughput for a single model.

CORS


Deployment

ModPod is packaged as a Docker image based on python:3.13.3-slim-bookworm and runs as a non-root user.

Resource recommendations

The SQLite registry is file-based and stored on the same volume as model artifacts. To scale ModPod horizontally, switch to an external database by setting MODPOD_DATABASE_URL to a shared database URL.

Validation

Health check returns 200 OK:
Authenticated listing returns an empty list (fresh install) or your registered models:

Ingress configuration

Routing and CORS for FlowX services

Setup guides overview

Full list of FlowX service setup guides
Last modified on June 15, 2026