managarten/services/mana-stt/install-services.sh
Till-JS 60394076e5 feat(mana-stt): add vLLM integration for Voxtral transcription
- Add vllm_service.py as proxy to vLLM server for Voxtral 3B/4B
- Add voxtral_api_service.py for Mistral API fallback
- Update main.py with /transcribe/voxtral endpoint using vLLM
- Add /transcribe/auto endpoint with automatic fallback chain
- Create setup-vllm.sh and start-vllm-voxtral.sh scripts
- Add launchd plist files for Mac Mini deployment
- Add install-services.sh for automated service installation

Architecture:
- vLLM server runs Voxtral models on port 8100
- mana-stt proxies to vLLM with Mistral API fallback
- Fallback chain: vLLM -> Mistral API

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 16:10:00 +01:00

84 lines
2.3 KiB
Bash
Executable file

#!/bin/bash
# Install mana-stt and vllm-voxtral as launchd services on macOS
# Run this script on the Mac Mini server
set -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
LAUNCH_AGENTS_DIR="$HOME/Library/LaunchAgents"
LOG_DIR="$HOME/logs"
echo "============================================"
echo "Installing ManaCore STT Services"
echo "============================================"
echo ""
# Create logs directory
mkdir -p "$LOG_DIR"
install_service() {
local service_name="$1"
local plist_file="$service_name.plist"
echo "Installing $service_name..."
# Stop existing service if running
if launchctl list | grep -q "$service_name"; then
echo " Stopping existing service..."
launchctl unload "$LAUNCH_AGENTS_DIR/$plist_file" 2>/dev/null || true
fi
# Copy plist to LaunchAgents
cp "$SCRIPT_DIR/$plist_file" "$LAUNCH_AGENTS_DIR/"
# Load the service
echo " Loading service..."
launchctl load "$LAUNCH_AGENTS_DIR/$plist_file"
sleep 2
if launchctl list | grep -q "$service_name"; then
echo "$service_name installed and running"
else
echo "$service_name failed to start"
return 1
fi
}
# Install vLLM first (STT depends on it)
install_service "com.manacore.vllm-voxtral"
# Wait for vLLM to initialize
echo ""
echo "Waiting for vLLM server to initialize..."
for i in {1..30}; do
if curl -s http://localhost:8100/health > /dev/null 2>&1; then
echo " ✓ vLLM server is ready"
break
fi
if [ $i -eq 30 ]; then
echo " ! vLLM server not responding yet (may still be loading model)"
fi
sleep 2
done
# Install STT service
echo ""
install_service "com.manacore.mana-stt"
echo ""
echo "============================================"
echo "Installation complete!"
echo "============================================"
echo ""
echo "Services:"
echo " vLLM Voxtral: http://localhost:8100"
echo " ManaCore STT: http://localhost:3020"
echo ""
echo "Useful commands:"
echo " View vLLM logs: tail -f $LOG_DIR/vllm-voxtral.log"
echo " View STT logs: tail -f $LOG_DIR/mana-stt.log"
echo " Health check: curl http://localhost:3020/health"
echo ""
echo "Stop all:"
echo " launchctl unload $LAUNCH_AGENTS_DIR/com.manacore.vllm-voxtral.plist"
echo " launchctl unload $LAUNCH_AGENTS_DIR/com.manacore.mana-stt.plist"