Make documentation standalone and generalize examples

This commit is contained in:
Melvin Strobl
2026-10-25 14:43:20 +01:00
parent 96ba512d40
commit 82c64a10b6
57 changed files with 553 additions and 481 deletions
+12 -8
View File
@@ -10,22 +10,26 @@ pip install fluksio-worker
fluksio-worker \
--url wss://api.example.com/api/v1/workers/attach \
--labels gpu,cuda12 \
--python /opt/torch-venv/bin/python
--python /path/to/node-venv/bin/python
```
`--python` is the interpreter node code runs on, which is how this machine keeps
its own wheels without the engine ever installing them. Mint a token from the
engine with `POST /api/v1/workers/tokens`; it carries this worker's name and
labels, and `--labels` may repeat those but not change them.
Replace the address and interpreter path with your own. Create a token on the
engine with `POST /api/v1/workers/tokens` and set `FLUKSIO_WORKER_TOKEN` before
starting the worker. See the [worker guide](https://docs.fluksio.com/code/workers/)
for the commands.
It sends the token as an `Authorization` header, which an engine from before
that does not read: upgrade the engine first, then its workers.
`--python` selects the environment holding your node dependencies. Omit it to
use the worker's own interpreter. The token fixes the worker's name and labels;
`--labels` may repeat those labels but cannot change them.
Engine and worker must use compatible protocols. Upgrade the engine first,
then its workers.
A plain `ws://` address is refused unless the engine is on this machine, since
the token and node secrets would cross the network in clear; `--insecure`
allows it on a network you trust.
Linux and macOS.
Requires Python 3.12 or newer on Linux or macOS.
## License