File size: 733 Bytes
fccaf48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
set -e

echo "[start] Launching ace-server on port 8085..."
/app/ace-server \
    --host 127.0.0.1 \
    --port 8085 \
    --models /app/models \
    --adapters /app/adapters \
    --max-batch 1 \
    &

ACE_PID=$!
echo "[start] ace-server PID: $ACE_PID"

# Wait for server to become healthy
echo "[start] Waiting for ace-server health..."
for i in $(seq 1 60); do
    if curl -sf http://127.0.0.1:8085/health > /dev/null 2>&1; then
        echo "[start] ace-server is healthy."
        break
    fi
    if ! kill -0 $ACE_PID 2>/dev/null; then
        echo "[start] ERROR: ace-server exited prematurely."
        exit 1
    fi
    sleep 2
done

echo "[start] Launching Gradio UI on port 7860..."
exec python3 /app/app.py