Add Gemma license gate and publish local model assets
Build and publish static assets / publish (push) Failing after 2s

This commit is contained in:
Ein Anderssono
2026-10-19 12:02:45 +02:00
parent 440652214c
commit 73c0c0b8ba
16 changed files with 699 additions and 7 deletions
+4 -2
View File
@@ -1,6 +1,6 @@
# AI-spel static assets
This repository publishes Piper/ONNX runtime assets and Swedish voice models through a dedicated Nginx service. The game keeps the same origin: ingress routes `/static/` here, `/` to the frontend, and `/api` to Rust.
This repository publishes Piper/ONNX runtime assets, Swedish voice models, and the browser's local Gemma 3/Wllama package through a dedicated Nginx service. The game keeps the same origin: ingress routes `/static/` here, `/` to the frontend, and `/api` to Rust.
The service contains only public, version-pinned files. Gitea Actions on the existing `large` runner downloads and verifies model files, runs checks, builds a `linux/amd64` image, bumps the patch version, and publishes the image, Helm chart, and rendered manifest to Harbor. Argo CD tracks the latest chart in the existing `ai-spel` project and namespace.
@@ -11,10 +11,12 @@ Assets under `/static/piper-wasm-v1/` are served with `Cache-Control: public, ma
- `/static/piper-wasm-v1/voices/` — Alma, Lisa, and NST Swedish voices, plus attribution.
- `/static/piper-wasm-v1/onnx/` — ONNX Runtime WASM and ES module loader.
- `/static/piper-wasm-v1/piper/` — Piper phonemizer WASM and data.
- `/static/wllama-gemma3-v1/` — local AI client adapter, integrity-pinned Wllama WebAssembly runtime, Gemma 3 1B Q4_K_M (806 MB), static manifest, and YAML assistance prompt. The client downloads these only from this server and caches the model on-device.
- Gemma distribution must also include the applicable Gemma Terms of Use copy, required notice, prohibited-use policy reference, source/conversion provenance, and all runtime/model license notices. The frontend must obtain explicit acceptance before download or use. Do not release the Gemma files until those resources and the client acceptance gate are implemented and checked by CI.
- `/static/version.txt` — active deployment version, without long-lived caching.
- `/static/version.json` — active deployment version as `{"version":"<semver>"}`, generated from the same `VERSION` value used by the image and Helm chart and checked after deployment.
The frontend worker remains bundled with the frontend; it fetches these large assets from same-origin static URLs. The browser does not request models from an external host.
The frontend's small orchestration code remains part of the frontend; it fetches every model, runtime, WebAssembly file, and browser prompt from same-origin static URLs. Upstream sources are used only by the pinned static CI fetcher. The browser does not request runtime assets from external hosts.
## Argo CD bootstrap