#!/bin/bash # edge0 model folder - relative-path launcher (no absolute paths) # EDGE0 path to the edge0 repo checkout; repo root must contain strata/ # PORT HTTP port (default 8094) # STRATA_BIN optional explicit engine binary set -e P="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" cd "$P" : "${EDGE0:?set EDGE0 to the edge0 repo root (the directory that contains strata/)}" if [ -z "${STRATA_BIN:-}" ]; then for c in "$EDGE0/strata/build/strata" "$EDGE0/strata/build-c13b/strata"; do [ -x "$c" ] && { STRATA_BIN="$c"; break; } done fi [ -x "${STRATA_BIN:-}" ] || { echo "no strata binary under $EDGE0/strata" >&2; exit 1; } export PATH="$(dirname "$STRATA_BIN"):$PATH" # CUDA 13 runtime libs shipped inside the venv, if present for d in "$EDGE0"/strata/.venv/lib/python*/site-packages/nvidia/cu13/lib; do [ -d "$d" ] && export LD_LIBRARY_PATH="$d${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" done exec "$EDGE0/strata/.venv/bin/python" "$EDGE0/strata/serve/server.py" \ --engine strata --config ./model.json --port "${PORT:-8094}"