aien-train
AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished.
Brought by drakestapleton
aien-train / tools / omegallm-ui / build.sh
| 1 | #!/bin/sh |
| 2 | # Explicit, temporary Mac host compatibility experiment. Not an Omega-native runtime. |
| 3 | set -eu |
| 4 | [ "$#" = 1 ] || { echo 'usage: build.sh OUTPUT_DIRECTORY' >&2; exit 2; } |
| 5 | out=$1 |
| 6 | here=$(CDPATH= cd -- "$(dirname "$0")" && pwd) |
| 7 | mkdir -p "$out/deps" |
| 8 | base=https://raw.githubusercontent.com/ggml-org/llama.cpp/7aca0d2ea8d92b56911233b822db01f9fbb1ae50/vendor |
| 9 | fetch() { |
| 10 | file=$1 url=$2 hash=$3 |
| 11 | if [ ! -f "$out/deps/$file" ]; then curl --fail --location "$url" -o "$out/deps/$file"; fi |
| 12 | actual=$(shasum -a 256 "$out/deps/$file" | cut -d' ' -f1) |
| 13 | [ "$actual" = "$hash" ] || { echo "dependency digest mismatch: $file" >&2; exit 65; } |
| 14 | } |
| 15 | fetch httplib.h "$base/cpp-httplib/httplib.h" a595e3f0d864e1606f9455ed4a8738de66fc8ef4abf7164e6570fe0e0393080b |
| 16 | fetch httplib.cpp "$base/cpp-httplib/httplib.cpp" 516c58994baa9bcc3b5616f453710c0b4d2d341ac473f788fcfb029f8548caa5 |
| 17 | fetch json.hpp "$base/nlohmann/json.hpp" 08f19bbcc66ff3082f5caf58867b1232987dba98d82e2b29d870722fce42776b |
| 18 | fetch httplib-LICENSE "$base/cpp-httplib/LICENSE" 4b45cbe16d7b71b89ae6127e26e0d90a029198ca5e958ad8e3d0b8bbed364d8b |
| 19 | # nlohmann/json's MIT notice is embedded in json.hpp. Keep both notices with the binary. |
| 20 | c++ -std=c++17 -O1 -pthread -Wall -Wextra -I "$out/deps" \ |
| 21 | "$here/bridge.cpp" "$out/deps/httplib.cpp" -o "$out/omega-ui-bridge" |
| 22 | shasum -a 256 "$out/omega-ui-bridge" |