Metadata-Version: 2.4
Name: sparkrun
Version: 0.4.1
Summary: Launch and manage Docker-based inference workloads on NVIDIA DGX Spark systems
Author-email: "scitrera.ai" <open-source-team@scitrera.com>
License-Expression: Apache-2.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: System :: Clustering
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: src/sparkrun/plugins/lil/LICENSE
License-File: src/sparkrun/plugins/oci_relay/LICENSE
License-File: src/sparkrun/orchestration/executors/seccomp/LICENSE
Requires-Dist: scitrera-app-framework==0.0.69
Requires-Dist: vpd==0.9.13
Requires-Dist: six==1.17.0
Requires-Dist: idna==3.15
Requires-Dist: pygments==2.20.0
Requires-Dist: click==8.4.2
Requires-Dist: pyyaml==6.0.3
Requires-Dist: packaging==26.0
Requires-Dist: huggingface-hub==2.2.0
Requires-Dist: textual==8.2.5
Requires-Dist: fastapi==0.143.0
Requires-Dist: uvicorn==0.54.0
Requires-Dist: starlette==1.7.0
Requires-Dist: pydantic==2.13.5
Requires-Dist: pydantic-core==2.46.5
Requires-Dist: anyio==4.12.1
Requires-Dist: h11==0.16.0
Requires-Dist: annotated-types==0.8.0
Requires-Dist: typing-inspection==0.4.4
Requires-Dist: opentelemetry-api==1.45.1
Requires-Dist: psutil==7.2.2
Requires-Dist: pywin32==312; sys_platform == "win32"
Provides-Extra: dev
Requires-Dist: pytest==9.0.3; extra == "dev"
Requires-Dist: pytest-cov==7.1.0; extra == "dev"
Requires-Dist: pyright[nodejs]==1.1.414; extra == "dev"
Requires-Dist: pytest-timeout==2.4.0; extra == "dev"
Dynamic: license-file

<p align="center">
  <img src="assets/sparkrun-banner.svg" alt="sparkrun — Part of the Spark Arena ecosystem" width="480" />
</p>

<p align="center">
  <a href="https://pypi.org/project/sparkrun/"><img src="https://img.shields.io/pypi/v/sparkrun?color=76b900" alt="PyPI version" /></a>
  <a href="https://github.com/spark-arena/sparkrun/blob/main/LICENSE"><img src="https://img.shields.io/github/license/spark-arena/sparkrun" alt="License" /></a>
  <a href="https://sparkrun.dev"><img src="https://img.shields.io/badge/docs-sparkrun.dev-1e40af" alt="Documentation" /></a>
  <a href="https://spark-arena.com"><img src="https://img.shields.io/badge/Spark_Arena-community-76b900" alt="Spark Arena" /></a>
</p>

<h3 align="center">One command to rule them all</h3>

<p align="center">
  Launch, manage, and stop LLM inference workloads on one or more NVIDIA DGX Spark systems — no Slurm, no Kubernetes, no fuss.
</p>

<p align="center">
  <a href="https://sparkrun.dev">Documentation</a> &middot;
  <a href="https://sparkrun.dev/getting-started/quick-start/">Quick Start</a> &middot;
  <a href="https://sparkrun.dev/recipes/overview/">Recipes</a> &middot;
  <a href="https://spark-arena.com">Spark Arena</a>
</p>

---

## Install

```bash
uvx sparkrun setup
```

One command — installs sparkrun, then launches the guided setup wizard to create a cluster, configure SSH mesh, detect ConnectX-7 NICs, set up sudoers, and enable earlyoom.

## Quick Start

```bash
# Run an inference workload
sparkrun run qwen3-1.7b-vllm

# Multi-node tensor parallelism (TP maps to node count on DGX Spark)
sparkrun run qwen3-1.7b-vllm --tp 2

# Re-attach to logs, stop a workload, check status
sparkrun logs qwen3-1.7b-vllm
sparkrun stop qwen3-1.7b-vllm
sparkrun status
```

Ctrl+C detaches from logs — it never kills your inference job. Your model keeps serving.

Watched launches also report Docker-start TTR and TTFT using a rank-local
streaming readiness check for Docker vLLM/SGLang launches. By default, `run`
follows startup logs and exits when ready; use `--follow` to stay attached,
`--no-follow` to wait without model logs, or `--no-ready-wait` to return after launch. See
[startup readiness](docs/STARTUP_READINESS.md) for configuration, timing
boundaries, per-recipe overrides, and execution-strategy integration.

See the [full CLI reference](https://sparkrun.dev/cli/overview/) for all commands and options.

## Updating

```bash
sparkrun update
```

Upgrades sparkrun (when installed via `uv tool`), applies compatible updates to trusted managed plugins, and refreshes recipe registries. Use `--no-update-plugins` for a local plugin compatibility audit without plugin updates. See [plugin management](docs/PLUGINS.md#install-and-manage-external-plugins).

Moving from 0.3.x or a preview build? See the [0.4.0 upgrade guide](docs/UPGRADING_0_4.md)
for plugin installation, changed defaults, and Python API migration.

### Update channels (advanced)

Opt into preview builds installed from git instead of PyPI:

```bash
sparkrun update --stable   # PyPI stable release (default)
sparkrun update --beta     # develop branch preview
sparkrun update --alpha    # develop-next branch (bleeding edge)
sparkrun update --yolo     # alias for --alpha
```

`sparkrun update` with no flag stays on your current channel; a channel flag switches and is remembered for future updates. The same flags work with `sparkrun setup install` and `sparkrun setup update`. Stable prints a plain version; beta/alpha add a channel suffix and commit (for example, `0.4.0-alpha+g1a2b3c4`). Switching from a preview channel back to `--stable` may downgrade.

## Highlights

- **Multi-runtime** — vLLM, SGLang, llama.cpp out of the box
- **Multi-node tensor parallelism** — `--tp 2` = 2 hosts, automatic InfiniBand/RDMA detection
- **VRAM estimation** — know if your model fits before you launch (`sparkrun show <recipe>`)
- **Git-based recipe registries** — we publish official recipes, community recipes, and benchmarked recipes via [Spark Arena](https://spark-arena.com), plus you can add your own registries.
- **Guided setup wizard** — cluster creation, SSH mesh, CX7 auto-detection, sudoers, earlyoom
- **Model & container distribution** — syncs models and images to cluster nodes over SSH automatically
- **Manifest model caches** — automatic [expected-file validation, selective weight downloads and pluggable model transfer](docs/MODEL_CACHE.md)

## Python API and applications (0.4.0)

The 0.4.0 branch introduces breaking Python API changes. Start with the
[migration guide](docs/DISTRIBUTION_API_MIGRATION.md), including the supported
imports and option/result contracts. [Application profiles](docs/APPLICATION_PROFILES.md)
let CLIs, daemons, and desktop applications share the core with their own identity,
paths, defaults, and plugins. Use `sparkrun.application.initialize()` for Python
API use without the Sparkrun CLI. The [catalog API](docs/CATALOG_API.md) supports
headless browsing, previews, and persistent recipe selection.

[Preparation-only builds](docs/BUILD.md) build images or native Python environments
and stage model assets before launch. Set `SPARKRUN_ADVANCED=1` to show
`sparkrun build` in CLI help.

[Benchmarking](docs/BENCHMARK_API.md) separates measurement frameworks from
publication integrations. [Plugin authors](docs/PLUGINS.md) register installed
integrations through `sparkrun.plugins`.

The [proxy CLI](docs/PROXY.md) uses LiteLLM by default on every channel.
[SparkRoute](docs/SPARKROUTE.md) is available as a separately installed plugin.
Docker now stages a custom seccomp profile allowing io_uring on each launch node;
see [executor configuration](docs/EXECUTORS.md#docker-seccomp-profiles-04).
vLLM no longer sets `OMP_NUM_THREADS` by default; recipes can set it explicitly.

The [daemon guide](docs/DAEMON.md) covers the authenticated local API, durable
jobs, desktop integration, and systemd deployment. Daemon
serving supports local TCP on Linux, macOS, and Windows behind the `daemon`
feature flag; Linux also supports peer-authenticated Unix sockets.

## Spark Arena
[Spark Arena](https://spark-arena.com) is the community hub for DGX Spark recipe benchmarks — browse benchmark results, then run them directly with sparkrun.

## Official Recipes
[Official Recipes](https://github.com/spark-arena/recipe-registry) are maintained by the Spark Arena team and hosted on GitHub. They are tested and optimized for NVIDIA DGX Spark systems.

## Community Recipes
[Community Recipes](https://github.com/spark-arena/community-recipe-registry) are contributed by the community and hosted on GitHub.

## License

sparkrun is licensed under the Apache License 2.0 — see [LICENSE](LICENSE).

## Anonymous Telemetry

sparkrun sends basic anonymous usage telemetry to `https://telemetry.sparkrun.dev` by default. Events include a random installation id stored in `~/.config/sparkrun/config.yaml`, sparkrun version, OS/version, system architecture, and command-specific metadata such as run runtime/model/parallelism/source/hardware counts, benchmark category/framework/profile/result keys, update version and registry counts, and setup-wizard step choices.

The data allows us to make informed decisions about new features for sparkrun or the greater DGX Spark ecosystem. 

Telemetry very specifically does not include personally identifiable information or information that may reveal trade secrets. Telemetry does not include hostnames, usernames, local file paths, tokens, secrets, logs, private HF or local models, or full command arguments. Disable it persistently with `sparkrun setup telemetry --disable`, re-enable with `sparkrun setup telemetry --enable`, or opt out for one process with `SPARKRUN_NO_TELEMETRY=1`.
