Make documentation standalone and generalize examples

This commit is contained in:
Melvin Strobl
2026-10-25 14:43:20 +01:00
parent 13bf0f76d7
commit bdb18b99da
57 changed files with 553 additions and 481 deletions
+5 -5
View File
@@ -26,11 +26,11 @@ invalidates its access. MCP uses a separate signing key at
`OAUTH_PRIVATE_KEY_FILE`; rotating that key invalidates all MCP tokens.
An instance connected to a [portal](../interface/portal.md) also answers
through it, at `https://hub.fluksio.com/i/<instance-id>/mcp` (the portal's
own `hub.` host for a custom one). The portal forwards the endpoint and its
OAuth, and the instance checks the agent's token as it does locally. The
consent page opens in the instance as the portal serves it, so open the
instance from the portal first if this browser has not recently.
through the portal's API address, for example
`https://portal.example.com/i/<instance-id>/mcp`. The portal forwards MCP and
OAuth requests; the instance checks the agent's token as it does locally.
Open the instance from the portal first so the browser can show its consent
page.
## Available tools
+2 -2
View File
@@ -57,7 +57,7 @@ that instance's running engine; plain mode refuses to start a duplicate.
| `--admin-email ADDR` | `admin@example.com` | First admin account |
| `--admin-password PW` | Generated | First admin password |
| `--enroll CODE` | Unset | Enroll before starting, if not already paired |
| `--portal URL` | `https://hub.fluksio.com` | Portal used by `--enroll` |
| `--portal URL` | Built-in portal address | Portal used by `--enroll` |
| `--max-runs N` | `4` | Concurrent batch runs |
| `--max-cascades N` | `4` | Concurrent live cascades |
| `--max-workers N` | `4` | Local Python worker processes |
@@ -106,7 +106,7 @@ from the instance's project directory, or select it explicitly.
| Option | Purpose |
|---|---|
| `--portal URL` | Use another portal instead of `https://hub.fluksio.com` |
| `--portal URL` | Use another compatible portal |
| `--as EMAIL` | Choose the local superuser represented by portal sessions |
| `--data-dir PATH` | Select instance storage |
| `--global` | Select `~/.fluksio` |
+7 -17
View File
@@ -132,9 +132,9 @@ storage; emitted frames alone are not recorded as run artifacts.
### Making clips playable on an LVGL panel
A wall panel that renders dashboards natively, such as an ESP32-P4 running
openpanel, decodes only H.264 Constrained Baseline (in software, about 29 fps
at 640×360) and MJPEG. It refuses clips straight from a phone or camera, which
are usually Main or High profile at 1080p or more. Re-encode those with a node
openpanel, decodes H.264 Constrained Baseline and MJPEG. Clips straight from
a phone or camera may use an unsupported profile or resolution, such as
Main or High profile at 1080p or more. Re-encode those with a node
that takes a `video` input port `clip` and has a `video` output port
`panel_clip`:
@@ -288,19 +288,9 @@ downloads them again. Point `MODELS` at a directory under `/data` to keep them
on the volume. An [attached worker](workers.md) starts a process per call and
loads the model each time.
What it costs, measured on a 2016 server CPU (Xeon E5-2683 v4):
| | Size | Memory | 3 s of speech, one core | All cores |
|---|---|---|---|---|
| Packages | 150 MB download, 460 MB installed | | | |
| Whisper `tiny` | 78 MB | 300 MB | 1.6 s | 0.7 s |
| Whisper `base` | 148 MB | 375 MB | 2.9 s | 1.2 s |
| piper `en_US-lessac-medium` | 63 MB | 250 MB | 0.6 s | 0.3 s |
Each model downloads once, on its node's first call. Loading it takes about a
second for Whisper and four seconds for piper. Memory is the worker's peak while
it holds the model. These figures come from piper's own speech fed back into
Whisper. A room microphone is harder, on `tiny` most of all.
Models download on first use. Speed, memory use and recognition quality depend
on your hardware, model and audio. Try a short clip from your own microphone
before choosing a model; `tiny` is a useful first stop on a small CPU.
## Printing
@@ -391,7 +381,7 @@ access token; see [The HTTP API](api.md).
managed environment can also install your project from a Modules manifest:
```text
-e /home/you/my-research
-e /path/to/my-research
numpy>=2
```
+7 -6
View File
@@ -38,11 +38,12 @@ export FLUKSIO_WORKER_TOKEN='<token from the engine>'
fluksio-worker \
--url wss://fluksio.example.com/api/v1/workers/attach \
--labels gpu,cuda12 \
--python /opt/torch-venv/bin/python
--python /path/to/node-venv/bin/python
```
Use your engine's hostname. `--python` selects the environment containing the
node's dependencies, such as PyTorch or a device SDK. If you install the worker
Replace the address and interpreter path with your own. `--python` selects
the environment containing the node's dependencies, such as PyTorch or a
device SDK. If you install the worker
in that environment, you can omit the option. An engine installation also
provides the same agent as `fluksio worker`.
@@ -55,7 +56,7 @@ provides the same agent as `fluksio worker`.
| `--python` | worker's interpreter | Python used for node code |
| `--parallel` | `1` | concurrent calls |
| `--artifact-url` | derived from `--url` | artifact endpoint, if hosted separately |
| `--service-host` | address the engine sees | host in a service's url, when the engine reaches this machine elsewhere, such as through a tunnel |
| `--service-host` | address the engine sees | reachable hostname or IP for services, when the connection address is unsuitable |
| `--cpus` | detected | advertised CPU count |
| `--gpus` | detected | advertised GPU count; explicit `0` means none |
| `--ram-mb` | detected | advertised memory in MB |
@@ -183,7 +184,7 @@ in `$DATA_DIR/provisioners.json`, replacing the example addresses and paths:
[{
"type": "slurm",
"name": "hpc",
"login": "me@login.cluster",
"login": "user@login.cluster.example.com",
"ssh_key": "/secrets/hpc_ed25519",
"engine_url": "wss://fluksio.example.com/api/v1/workers/attach",
"max_idle_s": 300,
@@ -195,7 +196,7 @@ in `$DATA_DIR/provisioners.json`, replacing the example addresses and paths:
"ram_mb": 65536,
"labels": ["gpu"],
"sbatch": ["--partition=gpu", "--gres=gpu:1", "--time=04:00:00"],
"prerun": ["module load cuda/12", "source ~/venvs/fluksio/bin/activate"]
"prerun": ["module load cuda", "source /path/to/node-venv/bin/activate"]
}]
}]
```