chore(mac-mini): remove all AI service infrastructure (moved to Windows GPU)

The Mac Mini hasn't run mana-llm/stt/tts/image-gen for a while — those
services live on the Windows GPU server now. The Mac-targeted
installers, plists, and platform-checking setup scripts have been
sitting in the repo as cargo-cult, suggesting Mac Mini deployment is
still a real option. It isn't.

Removed (Mac-Mini deployment infrastructure):

services/mana-stt/
- com.mana.mana-stt.plist            (LaunchAgent)
- com.mana.vllm-voxtral.plist        (LaunchAgent for the abandoned local Voxtral experiment)
- install-service.sh                 (single-service launchd installer)
- install-services.sh                (mana-stt + vllm-voxtral installer)
- setup.sh                           (Mac arm64 installer)
- scripts/setup-vllm.sh              (vLLM-Voxtral setup)
- scripts/start-vllm-voxtral.sh

services/mana-tts/
- com.mana.mana-tts.plist
- install-service.sh
- setup.sh                           (Mac arm64 installer)

scripts/mac-mini/
- setup-image-gen.sh                 (Mac flux2.c launchd installer)
- setup-stt.sh
- setup-tts.sh
- launchd/com.mana.image-gen.plist
- launchd/com.mana.mana-stt.plist
- launchd/com.mana.mana-tts.plist

setup-tts-bot.sh stays — it's the Matrix TTS bot installer (Synapse
side), not the mana-tts service.

Updated:
- services/mana-stt/CLAUDE.md, README.md — fully rewritten for the
  Windows GPU reality (CUDA WhisperX, Scheduled Task ManaSTT, .env keys
  matching the actual production .env on the box)
- services/mana-tts/CLAUDE.md, README.md — same treatment, documenting
  Kokoro/Piper/F5-TTS on the Windows GPU under Scheduled Task ManaTTS
- scripts/mac-mini/README.md — dropped the STT setup section, replaced
  with a pointer to docs/WINDOWS_GPU_SERVER_SETUP.md and the per-service
  CLAUDE.md files
- docs/MAC_MINI_SERVER.md — expanded the "deactivated launchagents"
  list to mention the now-removed plists, added the full GPU service
  port table with public URLs, added a cleanup snippet for any old plists
  still installed on a Mac Mini somewhere
This commit is contained in:
Till JS 2026-04-08 13:06:40 +02:00
parent c7b4388cec
commit f4347032ca
22 changed files with 226 additions and 1914 deletions

View file

@ -23,7 +23,6 @@ cd ~/projects/mana-monorepo
| Script | Purpose |
|--------|---------|
| `setup-autostart.sh` | Configure automatic startup on boot (run once) |
| `setup-stt.sh` | Setup STT service (Whisper + Voxtral) |
| `startup.sh` | Main startup script (called by launchd) |
| `health-check.sh` | Check all services health |
| `status.sh` | Show full system status |
@ -257,29 +256,18 @@ ollama list
ollama pull gemma3:4b
```
### STT Service (Speech-to-Text)
### AI Services (STT, TTS, LLM, Image-Gen, Video-Gen)
The STT service provides Whisper and Voxtral transcription:
These have moved off the Mac Mini entirely. They run on the Windows GPU
server (`mana-server-gpu`) as Windows Scheduled Tasks. See
[`docs/WINDOWS_GPU_SERVER_SETUP.md`](../../docs/WINDOWS_GPU_SERVER_SETUP.md)
for setup, and the per-service `services/mana-{stt,tts,llm,image-gen,video-gen}/CLAUDE.md`
files for endpoint details.
```bash
# Setup (first time)
./scripts/mac-mini/setup-stt.sh
Public URLs (proxied via Cloudflare Tunnel + the Mac Mini gpu-proxy):
# Check status
curl http://localhost:3020/health
# Transcribe audio
curl -X POST http://localhost:3020/transcribe \
-F "file=@audio.mp3" \
-F "language=de"
# View logs
tail -f /tmp/mana-stt.log
```
**Available endpoints:**
- `POST /transcribe` - Whisper transcription (recommended)
- `POST /transcribe/voxtral` - Voxtral transcription
- `POST /transcribe/auto` - Auto-select model
- `GET /health` - Health check
- `GET /models` - List available models
- `https://gpu-stt.mana.how`
- `https://gpu-tts.mana.how`
- `https://gpu-llm.mana.how`
- `https://gpu-img.mana.how`
- `https://gpu-video.mana.how`

View file

@ -1,53 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.mana.image-gen</string>
<key>ProgramArguments</key>
<array>
<string>/Users/mana/projects/mana-monorepo/services/mana-image-gen/.venv/bin/python3</string>
<string>-m</string>
<string>uvicorn</string>
<string>app.main:app</string>
<string>--host</string>
<string>0.0.0.0</string>
<string>--port</string>
<string>3025</string>
</array>
<key>WorkingDirectory</key>
<string>/Users/mana/projects/mana-monorepo/services/mana-image-gen</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/opt/homebrew/bin:/Users/mana/projects/mana-monorepo/services/mana-image-gen/.venv/bin:/usr/local/bin:/usr/bin:/bin</string>
<key>HOME</key>
<string>/Users/mana</string>
<key>PORT</key>
<string>3025</string>
<key>FLUX_BINARY</key>
<string>/Users/mana/flux2/flux</string>
<key>FLUX_MODEL_DIR</key>
<string>/Users/mana/flux2/model</string>
<key>DEFAULT_STEPS</key>
<string>4</string>
<key>GENERATION_TIMEOUT</key>
<string>300</string>
<key>CORS_ORIGINS</key>
<string>https://mana.how</string>
</dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
<key>Crashed</key>
<true/>
</dict>
<key>StandardOutPath</key>
<string>/tmp/mana-image-gen.log</string>
<key>StandardErrorPath</key>
<string>/tmp/mana-image-gen.error.log</string>
</dict>
</plist>

View file

@ -1,39 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.mana.mana-stt</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>-c</string>
<string>cd /Users/mana/projects/mana-monorepo/services/mana-stt &amp;&amp; set -a &amp;&amp; source .env &amp;&amp; set +a &amp;&amp; .venv/bin/uvicorn app.main:app --host 0.0.0.0 --port 3020</string>
</array>
<key>WorkingDirectory</key>
<string>/Users/mana/projects/mana-monorepo/services/mana-stt</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
</dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/Users/mana/logs/mana-stt.log</string>
<key>StandardErrorPath</key>
<string>/Users/mana/logs/mana-stt.error.log</string>
<key>ThrottleInterval</key>
<integer>10</integer>
</dict>
</plist>

View file

@ -1,39 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.mana.mana-tts</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>-c</string>
<string>cd /Users/mana/projects/mana-monorepo/services/mana-tts &amp;&amp; set -a &amp;&amp; source .env &amp;&amp; set +a &amp;&amp; .venv/bin/uvicorn app.main:app --host 0.0.0.0 --port 3022</string>
</array>
<key>WorkingDirectory</key>
<string>/Users/mana/projects/mana-monorepo/services/mana-tts</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
</dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/Users/mana/logs/mana-tts.log</string>
<key>StandardErrorPath</key>
<string>/Users/mana/logs/mana-tts.error.log</string>
<key>ThrottleInterval</key>
<integer>10</integer>
</dict>
</plist>

View file

@ -1,198 +0,0 @@
#!/bin/bash
# Setup script for Mana Image Generation as a launchd service on Mac Mini
# Run this on the Mac Mini server to install and start the image generation service
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
SERVICE_DIR="$REPO_DIR/services/mana-image-gen"
PLIST_NAME="com.mana.image-gen"
PLIST_PATH="$HOME/Library/LaunchAgents/$PLIST_NAME.plist"
# flux2.c paths (in home directory, no sudo required)
FLUX_BINARY="$HOME/flux2/flux"
FLUX_MODEL_DIR="$HOME/flux2/model"
echo "=========================================="
echo "Mana Image Generation - Mac Mini Setup"
echo "=========================================="
echo ""
echo "Service directory: $SERVICE_DIR"
echo "Plist path: $PLIST_PATH"
echo "Flux binary: $FLUX_BINARY"
echo "Flux model: $FLUX_MODEL_DIR"
echo ""
# Verify service directory exists
if [[ ! -d "$SERVICE_DIR" ]]; then
echo "Error: Service directory not found: $SERVICE_DIR"
exit 1
fi
# Run main setup if venv doesn't exist or flux2.c not installed
if [[ ! -d "$SERVICE_DIR/.venv" ]] || [[ ! -x "$FLUX_BINARY" ]]; then
echo "Running setup (installs flux2.c + Python environment)..."
echo ""
"$SERVICE_DIR/setup.sh"
echo ""
fi
# Verify flux2.c is available
if [[ ! -x "$FLUX_BINARY" ]]; then
echo "Error: flux2.c not found at $FLUX_BINARY"
echo "Please run setup.sh first to install flux2.c"
exit 1
fi
if [[ ! -d "$FLUX_MODEL_DIR" ]]; then
echo "Error: Model not found at $FLUX_MODEL_DIR"
echo "Please download the FLUX.2 klein 4B model"
exit 1
fi
# Create LaunchAgents directory if needed
mkdir -p "$HOME/Library/LaunchAgents"
# Unload existing service if running
if launchctl list | grep -q "$PLIST_NAME"; then
echo "Stopping existing service..."
launchctl unload "$PLIST_PATH" 2>/dev/null || true
fi
# Create plist file
echo "Creating launchd plist..."
cat > "$PLIST_PATH" << EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>$PLIST_NAME</string>
<key>ProgramArguments</key>
<array>
<string>$SERVICE_DIR/.venv/bin/uvicorn</string>
<string>app.main:app</string>
<string>--host</string>
<string>0.0.0.0</string>
<string>--port</string>
<string>3025</string>
</array>
<key>WorkingDirectory</key>
<string>$SERVICE_DIR</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/opt/homebrew/bin:$SERVICE_DIR/.venv/bin:/usr/local/bin:/usr/bin:/bin</string>
<key>PORT</key>
<string>3025</string>
<key>FLUX_BINARY</key>
<string>$FLUX_BINARY</string>
<key>FLUX_MODEL_DIR</key>
<string>$FLUX_MODEL_DIR</string>
<key>DEFAULT_STEPS</key>
<string>4</string>
<key>DEFAULT_WIDTH</key>
<string>1024</string>
<key>DEFAULT_HEIGHT</key>
<string>1024</string>
<key>GENERATION_TIMEOUT</key>
<string>120</string>
<key>CORS_ORIGINS</key>
<string>https://mana.how,http://localhost:5173</string>
</dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
<key>Crashed</key>
<true/>
</dict>
<key>ThrottleInterval</key>
<integer>10</integer>
<key>StandardOutPath</key>
<string>/tmp/mana-image-gen.log</string>
<key>StandardErrorPath</key>
<string>/tmp/mana-image-gen.error.log</string>
</dict>
</plist>
EOF
echo "Plist created: $PLIST_PATH"
# Load service
echo ""
echo "Loading service..."
launchctl load "$PLIST_PATH"
# Wait for startup
echo "Waiting for service to start..."
sleep 3
# Check if running
if launchctl list | grep -q "$PLIST_NAME"; then
echo "Service loaded successfully!"
else
echo "Warning: Service may not have loaded correctly."
echo "Check logs: tail -f /tmp/mana-image-gen.log"
fi
# Health check
echo ""
echo "Running health check..."
sleep 2
if curl -s http://localhost:3025/health | grep -q "healthy\|degraded"; then
echo "Health check passed!"
echo ""
curl -s http://localhost:3025/health | python3 -m json.tool
else
echo "Health check failed. Service may still be starting."
echo "Try again in a few seconds: curl http://localhost:3025/health"
fi
echo ""
echo "=========================================="
echo "Setup Complete!"
echo "=========================================="
echo ""
echo "Service management commands:"
echo ""
echo " # View logs"
echo " tail -f /tmp/mana-image-gen.log"
echo ""
echo " # Stop service"
echo " launchctl unload $PLIST_PATH"
echo ""
echo " # Start service"
echo " launchctl load $PLIST_PATH"
echo ""
echo " # Restart service"
echo " launchctl unload $PLIST_PATH && launchctl load $PLIST_PATH"
echo ""
echo " # Check status"
echo " launchctl list | grep $PLIST_NAME"
echo ""
echo "Test endpoints:"
echo ""
echo " # Health check"
echo " curl http://localhost:3025/health"
echo ""
echo " # Model info"
echo " curl http://localhost:3025/models"
echo ""
echo " # Generate image"
echo " curl -X POST http://localhost:3025/generate \\"
echo " -H 'Content-Type: application/json' \\"
echo " -d '{\"prompt\": \"A cat in space\"}'"
echo ""

View file

@ -1,153 +0,0 @@
#!/bin/bash
# Setup STT Service on Mac Mini
# Creates launchd service for auto-start
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
STT_DIR="$REPO_DIR/services/mana-stt"
PLIST_NAME="com.mana.stt"
PLIST_PATH="$HOME/Library/LaunchAgents/$PLIST_NAME.plist"
echo "=============================================="
echo " Mana STT Service Setup (Mac Mini)"
echo "=============================================="
echo ""
# Check if STT service directory exists
if [ ! -d "$STT_DIR" ]; then
echo "Error: STT service directory not found at $STT_DIR"
exit 1
fi
# Run the main setup script first
echo "1. Running STT service setup..."
cd "$STT_DIR"
if [ ! -d ".venv" ]; then
echo " Installing dependencies..."
./setup.sh
else
echo " Virtual environment already exists"
echo " Skipping dependency installation"
fi
# Create launchd plist
echo ""
echo "2. Creating launchd service..."
cat > "$PLIST_PATH" << EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>$PLIST_NAME</string>
<key>ProgramArguments</key>
<array>
<string>$STT_DIR/.venv/bin/uvicorn</string>
<string>app.main:app</string>
<string>--host</string>
<string>0.0.0.0</string>
<string>--port</string>
<string>3020</string>
</array>
<key>WorkingDirectory</key>
<string>$STT_DIR</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/opt/homebrew/bin:$STT_DIR/.venv/bin:/usr/local/bin:/usr/bin:/bin</string>
<key>PORT</key>
<string>3020</string>
<key>WHISPER_MODEL</key>
<string>large-v3</string>
<key>PRELOAD_MODELS</key>
<string>false</string>
<key>CORS_ORIGINS</key>
<string>https://mana.how</string>
</dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
<key>Crashed</key>
<true/>
</dict>
<key>ThrottleInterval</key>
<integer>10</integer>
<key>StandardOutPath</key>
<string>/tmp/mana-stt.log</string>
<key>StandardErrorPath</key>
<string>/tmp/mana-stt.error.log</string>
</dict>
</plist>
EOF
echo " Created: $PLIST_PATH"
# Unload if already loaded
echo ""
echo "3. Loading launchd service..."
launchctl unload "$PLIST_PATH" 2>/dev/null || true
launchctl load "$PLIST_PATH"
# Wait for service to start
sleep 2
# Check if service is running
echo ""
echo "4. Checking service status..."
if launchctl list | grep -q "$PLIST_NAME"; then
echo " Service is running"
# Check health endpoint
sleep 3
if curl -s http://localhost:3020/health > /dev/null 2>&1; then
echo " Health check passed"
HEALTH=$(curl -s http://localhost:3020/health)
echo " $HEALTH"
else
echo " Warning: Health check failed (service may still be starting)"
echo " Check logs: tail -f /tmp/mana-stt.log"
fi
else
echo " Warning: Service may not be running"
echo " Check logs: tail -f /tmp/mana-stt.error.log"
fi
echo ""
echo "=============================================="
echo " STT Service Setup Complete!"
echo "=============================================="
echo ""
echo "Service URL: http://localhost:3020"
echo ""
echo "Useful commands:"
echo " # View logs"
echo " tail -f /tmp/mana-stt.log"
echo ""
echo " # Restart service"
echo " launchctl kickstart -k gui/\$(id -u)/$PLIST_NAME"
echo ""
echo " # Stop service"
echo " launchctl unload $PLIST_PATH"
echo ""
echo " # Start service"
echo " launchctl load $PLIST_PATH"
echo ""
echo " # Test transcription"
echo " curl -X POST http://localhost:3020/transcribe \\"
echo " -F 'file=@audio.mp3' \\"
echo " -F 'language=de'"
echo ""

View file

@ -1,172 +0,0 @@
#!/bin/bash
# Setup script for Mana TTS as a launchd service on Mac Mini
# Run this on the Mac Mini server to install and start the TTS service
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
SERVICE_DIR="$REPO_DIR/services/mana-tts"
PLIST_NAME="com.mana.tts"
PLIST_PATH="$HOME/Library/LaunchAgents/$PLIST_NAME.plist"
echo "=========================================="
echo "Mana TTS - Mac Mini Setup"
echo "=========================================="
echo ""
echo "Service directory: $SERVICE_DIR"
echo "Plist path: $PLIST_PATH"
echo ""
# Verify service directory exists
if [[ ! -d "$SERVICE_DIR" ]]; then
echo "Error: Service directory not found: $SERVICE_DIR"
exit 1
fi
# Run main setup if venv doesn't exist
if [[ ! -d "$SERVICE_DIR/.venv" ]]; then
echo "Virtual environment not found. Running setup..."
echo ""
"$SERVICE_DIR/setup.sh"
echo ""
fi
# Create LaunchAgents directory if needed
mkdir -p "$HOME/Library/LaunchAgents"
# Unload existing service if running
if launchctl list | grep -q "$PLIST_NAME"; then
echo "Stopping existing service..."
launchctl unload "$PLIST_PATH" 2>/dev/null || true
fi
# Create plist file
echo "Creating launchd plist..."
cat > "$PLIST_PATH" << EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>$PLIST_NAME</string>
<key>ProgramArguments</key>
<array>
<string>$SERVICE_DIR/.venv/bin/uvicorn</string>
<string>app.main:app</string>
<string>--host</string>
<string>0.0.0.0</string>
<string>--port</string>
<string>3022</string>
</array>
<key>WorkingDirectory</key>
<string>$SERVICE_DIR</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/opt/homebrew/bin:$SERVICE_DIR/.venv/bin:/usr/local/bin:/usr/bin:/bin</string>
<key>PORT</key>
<string>3022</string>
<key>PRELOAD_MODELS</key>
<string>false</string>
<key>MAX_TEXT_LENGTH</key>
<string>1000</string>
<key>CORS_ORIGINS</key>
<string>https://mana.how</string>
</dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
<key>Crashed</key>
<true/>
</dict>
<key>ThrottleInterval</key>
<integer>10</integer>
<key>StandardOutPath</key>
<string>/tmp/mana-tts.log</string>
<key>StandardErrorPath</key>
<string>/tmp/mana-tts.error.log</string>
</dict>
</plist>
EOF
echo "Plist created: $PLIST_PATH"
# Load service
echo ""
echo "Loading service..."
launchctl load "$PLIST_PATH"
# Wait for startup
echo "Waiting for service to start..."
sleep 3
# Check if running
if launchctl list | grep -q "$PLIST_NAME"; then
echo "Service loaded successfully!"
else
echo "Warning: Service may not have loaded correctly."
echo "Check logs: tail -f /tmp/mana-tts.log"
fi
# Health check
echo ""
echo "Running health check..."
sleep 2
if curl -s http://localhost:3022/health | grep -q "healthy"; then
echo "Health check passed!"
echo ""
curl -s http://localhost:3022/health | python3 -m json.tool
else
echo "Health check failed. Service may still be starting."
echo "Try again in a few seconds: curl http://localhost:3022/health"
fi
echo ""
echo "=========================================="
echo "Setup Complete!"
echo "=========================================="
echo ""
echo "Service management commands:"
echo ""
echo " # View logs"
echo " tail -f /tmp/mana-tts.log"
echo ""
echo " # Stop service"
echo " launchctl unload $PLIST_PATH"
echo ""
echo " # Start service"
echo " launchctl load $PLIST_PATH"
echo ""
echo " # Restart service"
echo " launchctl unload $PLIST_PATH && launchctl load $PLIST_PATH"
echo ""
echo " # Check status"
echo " launchctl list | grep $PLIST_NAME"
echo ""
echo "Test endpoints:"
echo ""
echo " # Health check"
echo " curl http://localhost:3022/health"
echo ""
echo " # List voices"
echo " curl http://localhost:3022/voices"
echo ""
echo " # Synthesize with Kokoro"
echo " curl -X POST http://localhost:3022/synthesize/kokoro \\"
echo " -H 'Content-Type: application/json' \\"
echo " -d '{\"text\": \"Hello world\", \"voice\": \"af_heart\"}' \\"
echo " --output test.wav"
echo ""