Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/sovereign-intelligence/blob/main/portable-pack/build # sovereign-intelligence Front door to Drake Stapleton's sovereign stack. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `sovereign-intelligence / portable-pack / build` 38 lines ยท 1895 bytes Raw Blame History 1 #!/bin/bash 2 set -euo pipefail 3 if [[ $# != 6 ]]; then 4 echo 'Usage: build ROUND40.tar.gz INSTALLER-GIT ADAPTER-GIT ADAPTER-OMC LLAMA-RUNTIME NEW-OUT.tar.gz' >&2 5 exit 2 6 fi 7 base=$(cd "$(dirname "$0")" && pwd) 8 out=$(realpath -m -- "$6") 9 tmp=$(mktemp -d) 10 trap 'rm -rf -- "$tmp"' EXIT 11 p=$tmp/sovereign-intelligence 12 mkdir -p "$p/chat-runtime" 13 cp -- "$1" "$tmp/model.tar.gz" 14 echo "`1d7bc1c1b076de048ce5e026ca908edeb9e071b6679ba980cb6b6ba1237e5a7c` $tmp/model.tar.gz" | sha256sum -c - 15 tar -xzf "$tmp/model.tar.gz" -C "$p" 16 mv "$p/omega-round40-gb10" "$p/round40" 17 installer=`8be4c26c3b89bfbe72157344c0e3c76884f55e9e` 18 adapter=`54617926168301fc3d1def943cfa2ef1b79c161f` 19 git init -qb main "$tmp/foundation" 20 git -C "$tmp/foundation" fetch -q "$(realpath -- "$2")" "$installer" 21 git -C "$tmp/foundation" update-ref refs/heads/main "$installer" 22 git -C "$tmp/foundation" bundle create "$p/foundation.bundle" main 23 git -C "$3" archive "$adapter" tools/adapter | tar -x -C "$p" 24 mv "$p/tools/adapter" "$p/adapter" 25 rmdir "$p/tools" 26 cp -- "$4" "$p/adapter-omc" 27 echo "`45442c7d517fd605507bda5d1ec52493ff182661301cda69a95fc4f77dc6080d` $p/adapter-omc" | sha256sum -c - 28 while read -r sum name; do cp -L -- "$5/$name" "$p/chat-runtime/$name"; done < "$base/runtime.sha256" 29 (cd "$p/chat-runtime" && sha256sum -c "$base/runtime.sha256") 30 cp "$base"/{LICENSE.llama,install,si-pack,README.md} "$p/" 31 cp "$base/../seed/NOTICE" "$p/NOTICE.omega" 32 cp "$base/../LICENSE" "$p/LICENSE.omega" 33 chmod +x "$p"/{install,si-pack,adapter-omc} 34 (cd "$p" && find . -type f ! -name PACK.sha256 -print0 | LC_ALL=C sort -z | xargs -0 sha256sum > PACK.sha256) 35 stage=$(mktemp "$(dirname "$out")/.si-pack.XXXXXXXX") 36 trap 'rm -rf -- "$tmp"; rm -f -- "$stage"' EXIT 37 tar --format=ustar --sort=name --mtime=@0 --mode='u+rwX,go+rX,go-w' --owner=0 --group=0 --numeric-owner -C "$tmp" -cf - sovereign-intelligence | gzip -n -1 > "$stage" 38 ln -T -- "$stage" "$out"