omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / om / gpu / q36 / install-spark.sh
| 1 | #!/bin/sh |
| 2 | # Install the pure seeded-Omega Zero-CUDA Qwen 3.6 35B-A3B + Arboris package on DGX Spark. |
| 3 | # Installs binaries into ~/.local/opt/q36/, launchers into ~/.local/bin/{q36-35b,q36-serve}, |
| 4 | # writes ~/.local/opt/q36/manifest.json, and wires ~/.config/systemd/user/motor-revival.service. |
| 5 | set -eu |
| 6 | |
| 7 | repo_dir=${1:-.} |
| 8 | opt_dir="$HOME/.local/opt/q36" |
| 9 | bin_dir="$HOME/.local/bin" |
| 10 | model_dir="${Q36_MODEL_DIR:-$HOME/models/qwen3.6-35b-a3b-fp8-95a723d0}" |
| 11 | svc_dir="$HOME/.config/systemd/user" |
| 12 | svc_file="$svc_dir/motor-revival.service" |
| 13 | |
| 14 | mkdir -p "$opt_dir" "$bin_dir" |
| 15 | (cd "$repo_dir" && sh om/gpu/q36/build.sh "$opt_dir") |
| 16 | |
| 17 | sha_serve=$(sha256sum "$opt_dir/q36-serve" | awk '{print $1}') |
| 18 | sha_decode=$(sha256sum "$opt_dir/q36-decode" | awk '{print $1}') |
| 19 | sha_head=$(sha256sum "$opt_dir/q36-head" | awk '{print $1}') |
| 20 | sha_native=$(sha256sum "$opt_dir/q36-native" | awk '{print $1}') |
| 21 | commit_sha=$(git -C "$repo_dir" rev-parse HEAD 2>/dev/null || echo "unknown") |
| 22 | |
| 23 | cat > "$opt_dir/manifest.json" <<EOF |
| 24 | { |
| 25 | "package": "q36-35b-omega-arboris", |
| 26 | "model": "qwen3.6-35b-a3b-fp8", |
| 27 | "context_window": 131072, |
| 28 | "default_precision": "w4", |
| 29 | "arboris_enabled": true, |
| 30 | "zero_cuda": true, |
| 31 | "commit": "$commit_sha", |
| 32 | "model_dir": "$model_dir", |
| 33 | "binaries": { |
| 34 | "q36-serve": "$sha_serve", |
| 35 | "q36-decode": "$sha_decode", |
| 36 | "q36-head": "$sha_head", |
| 37 | "q36-native": "$sha_native" |
| 38 | } |
| 39 | } |
| 40 | EOF |
| 41 | |
| 42 | cat > "$bin_dir/q36-35b" <<EOF |
| 43 | #!/bin/sh |
| 44 | # Pure seeded-Omega Zero-CUDA Qwen 3.6 35B-A3B + Live Arboris launcher (Full-W4 default, --fp8 optional). |
| 45 | exec "$opt_dir/q36-serve" --model-dir "\${Q36_MODEL_DIR:-$model_dir}" "\$@" |
| 46 | EOF |
| 47 | chmod +x "$bin_dir/q36-35b" |
| 48 | ln -sf "$opt_dir/q36-serve" "$bin_dir/q36-serve" |
| 49 | ln -sf "$opt_dir/q36-decode" "$bin_dir/q36-decode" |
| 50 | |
| 51 | if [ -d "$svc_dir" ]; then |
| 52 | if [ -f "$svc_file" ] && [ ! -f "$svc_file.bak-pre-q36-omega" ]; then |
| 53 | cp "$svc_file" "$svc_file.bak-pre-q36-omega" |
| 54 | fi |
| 55 | cat > "$svc_file" <<EOF |
| 56 | [Unit] |
| 57 | Description=Qwen 3.6 35B-A3B Pure Seeded-Omega Zero-CUDA Server + Live Arboris (Full-W4 default) |
| 58 | After=network.target |
| 59 | |
| 60 | [Service] |
| 61 | Type=simple |
| 62 | ExecStart=$opt_dir/q36-serve --model-dir $model_dir --port 18091 |
| 63 | Restart=on-failure |
| 64 | RestartSec=3 |
| 65 | |
| 66 | [Install] |
| 67 | WantedBy=default.target |
| 68 | EOF |
| 69 | systemctl --user daemon-reload 2>/dev/null || true |
| 70 | fi |
| 71 | |
| 72 | echo "INSTALLED q36-35b-omega-arboris -> $opt_dir" |
| 73 | echo " q36-serve : $sha_serve" |
| 74 | echo " q36-decode: $sha_decode" |
| 75 | echo " launcher : $bin_dir/q36-35b (Full-W4 default + Live Arboris, --fp8 optional)" |
| 76 | echo " service : $svc_file (port 18091)" |