Files
LocalAI/backend/go/gemxcpp/run.sh
T
Richard Palethorpe 3de91d48d9 feat(motion): add GEM-X backend and duplex streaming API
Add the GEM-X native backend with live pose and root displacement output, bounded duplex WebSocket streaming, session authorization, metrics and usage accounting. Share the embedded bidirectional RPC channel adapter across streaming backends.

Include backend build and gallery integration, API documentation, schemas and tests.

Assisted-by: Codex:gpt-6
Signed-off-by: Richard Palethorpe <io@richiejp.com>
(cherry picked from commit 016dc3d71a)
2026-10-13 08:27:24 +00:00

20 lines
804 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
BACKEND_DIR=$(cd -- "$(dirname -- "$0")" && pwd)
export GEMX_MODULE="$BACKEND_DIR/lib"
export GEMX_DEVICE=CPU
if [ -f "$BACKEND_DIR/lib/libggml-vulkan.so" ]; then export GEMX_DEVICE=Vulkan; fi
# Precision must be fixed before the first process-wide GGML initialization.
export GGML_VK_DISABLE_F16=1 GGML_VK_DISABLE_COOPMAT=1 GGML_VK_DISABLE_COOPMAT2=1
if [ "$(uname -s)" = Darwin ]; then
export GEMX_LIBRARY="$BACKEND_DIR/lib/libgemx.dylib"
export DYLD_LIBRARY_PATH="$BACKEND_DIR/lib:${DYLD_LIBRARY_PATH:-}"
else
export GEMX_LIBRARY="$BACKEND_DIR/lib/libgemx.so"
export LD_LIBRARY_PATH="$BACKEND_DIR/lib:${LD_LIBRARY_PATH:-}"
fi
if [ -f "$BACKEND_DIR/lib/ld.so" ]; then
exec "$BACKEND_DIR/lib/ld.so" "$BACKEND_DIR/gemxcpp" "$@"
fi
exec "$BACKEND_DIR/gemxcpp" "$@"