aien-sovereign-core-mv
AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.
Brought by drakestapleton
aien-sovereign-core-mv / om / golden / build.sh
| 1 | #!/usr/bin/env bash |
| 2 | # Build om/golden/golden.om (or another source given as $2) with the pinned seeded omc. |
| 3 | # Usage: OMC=/path/to/omega-mv/seed/out/omc bash om/golden/build.sh OUT [SOURCE] |
| 4 | # Exit 0 built, 3 omc missing or not the pinned compiler (NOT_RUN), 1 compile error. |
| 5 | set -u |
| 6 | PIN=62775d2a391cfef7cde64e387655caa9809a267093112910ec76bfa568f3712b # omega-mv bf54b19f seed/out/omc |
| 7 | root=$(cd "$(dirname "$0")/../.." && pwd) |
| 8 | out=${1:?usage: OMC=... build.sh OUT [SOURCE]} |
| 9 | src=${2:-$root/om/golden/golden.om} |
| 10 | OMC=${OMC:-${OMEGA_OMC:-}} |
| 11 | [ -n "$OMC" ] && [ -x "$OMC" ] || { echo "NOT_RUN: set OMC to omega-mv bf54b19f seed/out/omc" >&2; exit 3; } |
| 12 | got=$(sha256sum "$OMC" | cut -c1-64) |
| 13 | [ "$got" = "$PIN" ] || { echo "NOT_RUN: omc sha256 $got, pinned $PIN" >&2; exit 3; } |
| 14 | { printf 'om2\n'; cat "$root/om/vendor/json.om" "$root/om/vendor/sha256.om" "$src"; } | "$OMC" > "$out" 2> "$out.err" \ |
| 15 | || { echo "compile $src: $(cat "$out.err")" >&2; rm -f "$out" "$out.err"; exit 1; } |
| 16 | rm -f "$out.err" |
| 17 | chmod 700 "$out" |