Files
MarkBase Admin 85dd87e28a
CI / build (push) Waiting to run
CI / unit-tests (push) Blocked by required conditions
CI / lint (push) Blocked by required conditions
v2: add embedding tests, multilingual embedding support
2026-07-06 08:01:52 +08:00

54 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# Setup MarkBase model servers as launchd services
set -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
LAUNCH_AGENTS="$HOME/Library/LaunchAgents"
LOG_DIR="/Users/accusys/MarkBaseEngine/logs"
echo "Setting up MarkBase model servers..."
# Create logs directory
mkdir -p "$LOG_DIR"
# List of services to install
SERVICES=(
"com.markbase.e4b.plist"
"com.markbase.12b.plist"
"com.markbase.26b.plist"
"com.markbase.31b.plist"
"com.markbase.embedding.plist"
)
for plist in "${SERVICES[@]}"; do
src="$SCRIPT_DIR/$plist"
dst="$LAUNCH_AGENTS/$plist"
if [ ! -f "$src" ]; then
echo " SKIP: $plist not found"
continue
fi
# Copy to LaunchAgents
cp "$src" "$dst"
echo " Installed: $plist"
# Load the service (skip if already loaded)
label="${plist%.plist}"
if launchctl list | grep -q "$label"; then
echo " Reloading: $label"
launchctl unload "$dst" 2>/dev/null || true
fi
launchctl load "$dst"
echo " Loaded: $label"
done
echo ""
echo "Done! Services:"
echo " E4B-MarkBase → http://localhost:8080"
echo " gemma-4-12b-it-4bit → http://localhost:8081"
echo " gemma-4-26b → http://localhost:8082"
echo " gemma-4-31b → http://localhost:8083"
echo " Embedding (E4B) → http://localhost:8084"