From 72bf754baacd448b9cad946e4c0dc5d638bedde7 Mon Sep 17 00:00:00 2001 From: Grant Date: Tue, 12 May 2026 09:52:53 -0500 Subject: [PATCH] Pack spark-control_x86_64.s9pk (55 MB) - Move models.yaml into image/ so the docker build context is self-contained - Fix manifest: dockerfile=../image/Dockerfile, workdir=../image - Add LICENSE (MIT) and assets/README.md (StartOS marketplace listing) - s9pk validates: id=spark-control, version=0.1.0:0, osVersion=0.4.0-beta.6, sdkVersion=1.3.3 - Image embeds python:3.12-slim + openssh-client + FastAPI app + models.yaml --- LICENSE | 21 +++++++++++++++++++ README.md | 3 +-- image/Dockerfile | 2 -- models.yaml => image/models.yaml | 0 package/LICENSE | 21 +++++++++++++++++++ package/assets/README.md | 35 +++++++++++++++++++++++++++++++ package/startos/manifest/index.ts | 2 +- 7 files changed, 79 insertions(+), 5 deletions(-) create mode 100644 LICENSE rename models.yaml => image/models.yaml (100%) create mode 100644 package/LICENSE create mode 100644 package/assets/README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1de589a --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Alice + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index d3252a4..77eb8ec 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,7 @@ Open . ## Repo layout -- `models.yaml` — model catalog (also bundled into the image) -- `image/` — Docker image source +- `image/` — Docker image source (FastAPI app + `models.yaml`) - `package/` — StartOS 0.4 package source - `scripts/build-s9pk.sh` — convenience wrapper around the StartOS build - `runbook.md` — operating notes diff --git a/image/Dockerfile b/image/Dockerfile index 0a2501b..f2a9b85 100644 --- a/image/Dockerfile +++ b/image/Dockerfile @@ -10,8 +10,6 @@ COPY app /app/app COPY entrypoint.sh /app/entrypoint.sh RUN chmod +x /app/entrypoint.sh -# models.yaml is mounted in or copied at build via build-context root. -# For Docker, build from the repo root: `docker build -f image/Dockerfile .` COPY models.yaml /app/models.yaml RUN pip install --no-cache-dir -e . diff --git a/models.yaml b/image/models.yaml similarity index 100% rename from models.yaml rename to image/models.yaml diff --git a/package/LICENSE b/package/LICENSE new file mode 100644 index 0000000..1de589a --- /dev/null +++ b/package/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Alice + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/package/assets/README.md b/package/assets/README.md new file mode 100644 index 0000000..a1bad30 --- /dev/null +++ b/package/assets/README.md @@ -0,0 +1,35 @@ +# Spark Control + +A browser-based control panel for a dual-DGX-Spark vLLM cluster on your LAN. See which LLM is loaded, swap to another with one click, and watch the streaming log until the new model is ready. + +## What you get on StartOS + +After install you have: + +- **A web UI** at the package's LAN address (HTTPS, .local). +- **One-click model swaps** for any model in your `models.yaml` catalog. +- **Live status** of vLLM, Parakeet (STT), and Magpie (TTS). + +## Getting set up + +This package SSHes into your Spark server to run cluster commands, so it needs a one-time setup: + +1. **Open Actions → Show Public Key.** Copy the ed25519 public key that the package generated. +2. **SSH into each Spark** and append the key to `~/.ssh/authorized_keys`: + ```bash + echo "" >> ~/.ssh/authorized_keys + ``` +3. **Open Actions → Configure Sparks.** Enter the LAN hostnames or IPs for Spark 1 and Spark 2, plus the SSH username (usually ``). +4. **Open the Web UI.** It will hit each Spark to confirm. If both indicators are green you're done. + +## Using Spark Control + +Once configured, open the web interface from your phone or laptop. The current model is shown in the top bar. Each available model has a card with a "Switch to this" button. Clicking it stops the current model and launches the new one — the log tails in real time until `Application startup complete.` appears (3–6 min depending on the model). + +## Editing the model catalog + +The bundled catalog covers the models in the starter `models.yaml`. To add a model, ssh into the StartOS server and edit `/embassy-data/package-data/volumes/spark-control/main/models.yaml`, then restart the service. (A proper "Edit Model Catalog" action is on the roadmap.) + +## Source code + + (TBD) diff --git a/package/startos/manifest/index.ts b/package/startos/manifest/index.ts index de886e8..b497b1e 100644 --- a/package/startos/manifest/index.ts +++ b/package/startos/manifest/index.ts @@ -17,7 +17,7 @@ export const manifest = setupManifest({ source: { dockerBuild: { dockerfile: '../image/Dockerfile', - workdir: '..', + workdir: '../image', }, }, arch: ['x86_64', 'aarch64'],