- Add tunnel.sh for SSH tunneling to vLLM server (port 8000 is firewalled, tunnel required for local dev) - Add dev:tunnel script to package.json for running dev with tunnel - Add SYNAP_SPACE env var support to synap.ts, sends X-Memory-Space-Id header when set - Fix SSR hydration mismatch in person-switcher by deferring personId render until client mount Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
31 lines
862 B
Bash
Executable File
31 lines
862 B
Bash
Executable File
#!/bin/bash
|
|
# Ensure SSH tunnel to msd5685 vLLM (Qwen3-8B) is running on localhost:8000
|
|
# Port 8000 is firewalled on the box — tunnel is required.
|
|
|
|
HOST="msd5685.mjhst.com"
|
|
LOCAL_PORT=8000
|
|
REMOTE_PORT=8000
|
|
SSH_KEY="$HOME/.ssh/id_rsa"
|
|
SSH_USER="ubuntu"
|
|
|
|
# Check if tunnel is already up
|
|
if lsof -i ":$LOCAL_PORT" -sTCP:LISTEN &>/dev/null; then
|
|
echo "vLLM tunnel already active on localhost:$LOCAL_PORT"
|
|
else
|
|
echo "Starting SSH tunnel to $HOST..."
|
|
ssh -f -N -L "$LOCAL_PORT:localhost:$REMOTE_PORT" \
|
|
-i "$SSH_KEY" \
|
|
-o StrictHostKeyChecking=no \
|
|
-o UserKnownHostsFile=/dev/null \
|
|
-o ServerAliveInterval=60 \
|
|
-o ServerAliveCountMax=3 \
|
|
"$SSH_USER@$HOST"
|
|
|
|
if lsof -i ":$LOCAL_PORT" -sTCP:LISTEN &>/dev/null; then
|
|
echo "vLLM tunnel active → localhost:$LOCAL_PORT"
|
|
else
|
|
echo "Failed to start tunnel" >&2
|
|
exit 1
|
|
fi
|
|
fi
|