Adds the "real model on a rented GPU" proof the rental-proof was building toward.
scripts/gpu-model-proof.sh — one command:
- ensures mlx-lm in a throwaway venv (Apple Silicon / Metal),
- starts a JetStream nats-server + the provider-daemon,
- dispatches an ai-inference task over NATS whose payload (scripts/gpu_infer.py)
loads a real 4-bit quantized LLM and generates text on the GPU,
- prints the daemon-captured model output and tears everything down.
Verified on an Apple M4 Max: the daemon receives the task over NATS, runs
mlx-community/Llama-3.2-1B-Instruct-4bit on the Metal GPU (device "Device(gpu, 0)",
~235 tokens/sec, 0.81 GB GPU peak), and returns a real coherent answer with
exitCode 0. So the full chain is real end to end: detect GPU -> rent -> dispatch
over NATS -> daemon executes -> real model runs on the GPU -> output returned.
scripts/gpu_infer.py is the MLX inference payload (swap --model for any
mlx-community repo; a PyTorch payload works for CUDA/NVIDIA). docs/PROOF.md and
the README document the run; the only thing still unproven is *distributed*
multi-node inference (one model sharded across many rented GPUs).
Extends the rental-proof into a full, reproducible end-to-end demonstration that
the rental flow works with real code on real infrastructure, and fixes the two
genuine bugs the exercise surfaced.
scripts/rental-proof.sh — one command, self-contained:
[1] detect real GPU via provider-daemon --get-gpus-json
[2] databases throwaway Postgres + the dante DBs (fixed init script)
[3] persist real detection + pricing + a metered session written to and read
back from Postgres via the live billing store (independently
re-queried via SQL in the script output)
[4] dispatch JetStream-enabled nats-server + the daemon; a task is published
over NATS, the daemon receives and EXECUTES it (exitCode 0,
stdout "hello-from-dantegpu") and reports status back
Spins up throwaway Postgres + NATS (never touches yours) and tears them down.
No Docker / NVIDIA required.
rental-proof harness gains --dsn: persists a real RentalSession (schema init,
wallet, session, usage record, settlement, read-back) through the live
PostgresStore and folds the DB-confirmed cost into the SHA-256 receipt.
Bug fixes the proof flushed out:
- provider-daemon NATS dispatch was fully broken: the default subject pattern
`dante.tasks.dispatch.>` had the wrong stream prefix and no %s for the
instance id, so fmt.Sprintf produced a garbage subject and no JetStream stream
matched. Fixed to `tasks.dispatch.%s.*` (captured by the TASKS stream); the
daemon now subscribes and runs dispatched tasks.
- (Apple VRAM=0 detection fix shipped in the prior commit.)
Docs: docs/PROOF.md walks the run + independent hash verification; README links
it; the console provider onboarding tells providers to verify detection with
`--get-gpus-json`.
The docker-compose stack provisions one Postgres instance with a database per
service (dante_auth, dante_billing, dante_registry, dante_scheduler,
dante_storage). The init script created these via a PL/pgSQL function that ran
`EXECUTE 'CREATE DATABASE ...'`, but PostgreSQL forbids CREATE DATABASE inside a
function or transaction block. dante_auth already exists (POSTGRES_DB) so it was
skipped, but the first real creation (dante_billing) raised:
ERROR: CREATE DATABASE cannot be executed from a function
leaving billing/registry/scheduler/storage uncreated. Their services then failed
to connect ("failed to connect user=dante_user"), exactly as reported in #3.
Rewrote the script to use the canonical psql \gexec pattern, which runs each
generated CREATE DATABASE outside any transaction, guarded by NOT EXISTS for
idempotency, plus an ALTER DATABASE OWNER pass for pre-existing databases.
Verified against a throwaway PostgreSQL 15 cluster: the old script errors on
dante_billing and leaves only dante_auth; the new script creates all five
databases and completes cleanly.
- Remove docs/archive/ entirely (11 progress reports + legacy dev guide).
- Remove three self-congratulatory docs (SECURITY_AUDIT_REPORT marked "PASSED /
Production Ready" despite 186 dependency vulns, PERFORMANCE_OPTIMIZATION_REPORT,
CODE_REVIEW_CHECKLIST), all carrying a leftover joke line.
- Strip the same joke line from kept files (API doc, runbook, start scripts).
- Delete dead stub folders: src/ (orphan Rust fragment), user-dashboard/ (empty
API-client stub, no UI), mobile-app/ (1 of 6 screens, would not build).
- Repoint k8s ingress from the deleted user-dashboard stub to the real frontend.
- Add docs/README.md index; update README/ROADMAP/STATUS to match.
Docs now: README/ROADMAP/CONTRIBUTING at root, five core docs under docs/,
service-specific READMEs co-located with their services.