Skip to main content

Web UI for spark-vllm-docker — recipe management, deployment, and monitoring for DGX Spark

Project description

Spark Pulse

Web UI for spark-vllm-docker — recipe management, deployment, and monitoring for NVIDIA DGX Spark hardware.

License: MIT — Copyright © 2026 Kharkevich Engineering Lab

Disclaimer: This project is not sponsored by, endorsed by, or affiliated with NVIDIA Corporation or any of its subsidiaries. NVIDIA, DGX, and NVIDIA trademarks are property of their respective owners.

Features

  • Recipe Browser — Browse available vLLM deployment recipes, view model details, configs, and mods
  • Job Management — Launch deployments with custom parameters, monitor status, view live logs via SSE, stop jobs
  • Memory Monitor — Real-time GPU memory, CPU RAM, and disk usage via SSE streaming
  • Cache Manager — Browse and clean HF model cache, wheels, ccache, Triton cache, and more
  • Settings — Configure spark-vllm-docker path, default container, GPU memory utilization
  • OIDC Authentication — Configurable authentication (Keycloak, Auth0, Google, Azure AD, etc.)
  • Dark/Light Theme — Switch between dark, light, or system theme (persisted in localStorage)
  • Custom Modals — Beautiful confirmation dialogs and error alerts
  • MCP Server — Expose spark-vllm-docker operations as Model Context Protocol tools for AI assistants

Architecture

┌─────────────┐     HTTP / SSE     ┌──────────────────────┐
│   Browser    │ ◄───────────────► │  FastAPI + Uvicorn   │
│  React SPA   │                    │  Port 8100           │
└─────────────┘                    │                      │
                                   │  spark-vllm-docker/  │
                                   │  Docker, nvidia-smi  │
                                   └──────────────────────┘

Project Structure

spark-pulse/
├── pyproject.toml           # Python package config (setuptools)
├── README.md
├── LICENSE
│
├── spark_pulse/             # Python package
│   ├── __init__.py          # Package init + version
│   ├── app.py               # FastAPI app factory (creates app, mounts SPA)
│   ├── cli.py               # CLI: spark-pulse start|install|mcp|...
│   ├── config.py            # Config loader (YAML + env vars)
│   ├── service.py           # Systemd service management
│   ├── auth.py              # OIDC authentication middleware + routes
│   ├── mcp_server.py        # MCP (Model Context Protocol) server
│   ├── config.yaml          # Default configuration
│   ├── routers/             # API route modules
│   │   ├── recipes.py           # Recipe listing + detail
│   │   ├── deployments.py       # Deployment CRUD + launch/stop
│   │   ├── memory.py            # GPU/CPU/disk stats
│   │   ├── cache.py             # Cache scanning + cleanup
│   │   └── settings.py          # Settings CRUD
│   ├── tools/               # Tool abstractions (real/mock swap)
│   │   ├── __init__.py          # Factory: real vs mock
│   │   ├── system.py            # nvidia-smi, free, df
│   │   ├── cache.py             # cache dir scanning
│   │   └── recipes.py           # YAML recipe parsing
│   ├── mock/                # Simulation mode implementations
│   │   ├── system.py              # DGX Spark 128GB mock
│   │   ├── cache.py               # Plausible cache sizes
│   │   ├── recipes.py             # 6 realistic recipes
│   │   └── deployments.py         # In-memory tracker
│   ├── ui/                  # Built frontend (generated by `npm run build`)
│   │   └── index.html       # Vite build output
│   └── data/                # Persistent state (deployments.json)
│
├── web/                     # Frontend (separate npm project)
│   ├── package.json         # Vite + React + TypeScript + Tailwind
│   ├── vite.config.ts       # Builds to ../spark_pulse/ui/
│   ├── tsconfig.json
│   └── src/
│       ├── main.tsx             # Entry point
│       ├── App.tsx              # Router + AuthProvider
│       ├── lib/
│       │   ├── types.ts         # TypeScript types
│       │   ├── api.ts           # API client + SSE hooks
│       │   ├── utils.ts         # Formatting helpers
│       │   ├── theme.ts         # Theme state manager
│       │   └── auth.ts          # Auth context
│       ├── hooks/
│       │   └── useQuery.ts      # Data fetching hook
│       ├── components/
│       │   ├── Layout.tsx       # Sidebar nav + theme toggle
│       │   ├── StatusBadge.tsx  # Status indicators
│       │   └── Modal.tsx        # Confirm + Alert modals
│       └── pages/
│           ├── RecipesPage.tsx
│           ├── JobsPage.tsx
│           ├── MemoryPage.tsx
│           ├── CachePage.tsx
│           └── SettingsPage.tsx
│
└── scripts/
    ├── run-dev-server.sh      # Full dev (venv + frontend + backend)
    ├── run-backend.sh         # Backend only (simulation)
    ├── run-production.sh      # Production mode
    └── build-ui.sh            # Build frontend only

Installation

As a Python package

# Install from local repo
pip install -e .

# Or with MCP support
pip install -e ".[mcp]"

This provides the spark-pulse CLI command.

First-time setup

# Install Python dependencies (from repo root)
pip install -e ".[dev]"

# Build frontend
cd web && npm install && npm run build && cd ..

# Configure (edit spark_pulse/config.yaml or use Settings page)
# Default spark_vllm_path: /tmp/spark-vllm-docker

Usage

Quick start (development)

# One command — venv + frontend deps + backend (sim) + frontend dev server
./scripts/run-dev-server.sh
# → Frontend: http://localhost:3000
# → Backend:  http://localhost:8100 (+ /docs Swagger UI)

Simulation mode (local dev without DGX)

Set SIMULATION_MODE=1 to get mock data for all APIs — useful for frontend development on macOS or any machine without a DGX Spark:

# Full dev (includes frontend dev server)
./scripts/run-dev-server.sh

# Backend only (simulation)
./scripts/run-backend.sh
# → http://localhost:8100

# Production mode (real tools, needs spark-vllm-docker + nvidia-smi)
./scripts/run-production.sh

# Just build frontend into spark_pulse/ui/
./scripts/build-ui.sh

Systemd service (production)

# Install systemd unit
sudo spark-pulse install

# Uninstall
sudo spark-pulse uninstall

# Check status
spark-pulse status

# Stop service
spark-pulse stop-service

MCP Server (AI Assistants)

Expose spark-vllm-docker operations as MCP tools:

# Start MCP server (stdio mode for AI assistants)
spark-pulse mcp

Exposed tools:

  • list_recipes — list available deployment recipes
  • get_recipe — get recipe details by name
  • create_deployment — launch a recipe deployment
  • stop_deployment — stop a running deployment
  • list_deployments — list all deployments with status
  • get_memory — get GPU/CPU/disk stats
  • list_cache — list cache directories with sizes
  • clean_cache — clean specified cache directories
  • get_logs — get deployment logs

OIDC Authentication

Configure authentication in spark_pulse/config.yaml:

auth_enabled: true
oidc_provider_url: https://keycloak.example.com/realms/myrealm
oidc_client_id: spark-manager
oidc_client_secret: your-secret-here

Or via environment variables:

export SPARK_PULSE_AUTH_ENABLED=true

When enabled:

  • All routes are protected except /health, /auth/*
  • Users are redirected to the OIDC provider on /auth/login
  • After successful auth, users see their name and a logout button in the header

Environment variables

Override config via environment:

export SPARK_VLLM_PATH=/path/to/spark-vllm-docker
export WEBUI_PORT=8100
export SPARK_PULSE_AUTH_ENABLED=true

API Reference

Method Path Description
GET /api/recipes List all recipes
GET /api/recipes/{id} Recipe details
GET /api/deployments List deployments
POST /api/deployments Create + launch
DELETE /api/deployments/{id} Stop deployment
GET /api/deployments/{id}/logs Recent logs
GET /api/memory All memory stats
GET /api/memory/gpu GPU stats
GET /api/cache Cache dirs + sizes
POST /api/cache/clean Clean caches
GET /api/settings Current settings
PUT /api/settings Update settings
GET /auth/login Redirect to OIDC login
GET /auth/callback OIDC callback
GET /auth/me Current user info
GET / SPA entry point

Building for distribution

# Build frontend
cd web && npm run build && cd ..

# Build Python package
python -m build

The built frontend is bundled into the wheel via package-data: ui/**/*.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spark_pulse-1.0.0.tar.gz (120.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spark_pulse-1.0.0-py3-none-any.whl (123.4 kB view details)

Uploaded Python 3

File details

Details for the file spark_pulse-1.0.0.tar.gz.

File metadata

  • Download URL: spark_pulse-1.0.0.tar.gz
  • Upload date:
  • Size: 120.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spark_pulse-1.0.0.tar.gz
Algorithm Hash digest
SHA256 64bc980927648e5ccfb2049fdd37bda6d71dcc3c0cdbbd537c668e0365f60617
MD5 866631b1380aebd253266061e46c69b6
BLAKE2b-256 e4032ed8ee90d862ae6ceb50390fbb796aa82898d7c21d579395e5894c6c2f05

See more details on using hashes here.

Provenance

The following attestation bundles were made for spark_pulse-1.0.0.tar.gz:

Publisher: release.yml on kharkevich-engineering-lab/spark-pulse

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spark_pulse-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: spark_pulse-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 123.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spark_pulse-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67dbd0e419eea8e47129d1e3a36643032bfb8fc9d67049bf4ac76643207bc737
MD5 3bda98b4f257b0b218a42e3647c6fadb
BLAKE2b-256 096a47ca0d6677158588bb4b296c045db5e5334fa1d87c33e28360534dfa9bbb

See more details on using hashes here.

Provenance

The following attestation bundles were made for spark_pulse-1.0.0-py3-none-any.whl:

Publisher: release.yml on kharkevich-engineering-lab/spark-pulse

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page