-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-entrypoint.sh
More file actions
55 lines (45 loc) · 1.49 KB
/
docker-entrypoint.sh
File metadata and controls
55 lines (45 loc) · 1.49 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/sh
set -e
echo "Starting Statistics Agent Team with Eino Orchestration"
echo "========================================================"
echo ""
echo "Research Agent: http://localhost:8001"
echo "Verification Agent: http://localhost:8002"
echo "Orchestration (Eino): http://localhost:8003"
echo "Synthesis Agent: http://localhost:8004"
echo ""
# Start research agent in background
echo "Starting Research Agent on :8001..."
/app/research &
RESEARCH_PID=$!
# Start synthesis agent in background
echo "Starting Synthesis Agent on :8004..."
/app/synthesis &
SYNTHESIS_PID=$!
# Start verification agent in background
echo "Starting Verification Agent on :8002..."
/app/verification &
VERIFICATION_PID=$!
# Wait a bit for agents to initialize
sleep 2
# Start orchestration agent in foreground
echo "Starting Eino Orchestration Agent on :8003..."
/app/orchestration-eino &
ORCHESTRATION_PID=$!
echo ""
echo "All agents started successfully!"
echo "========================================================"
echo ""
# Function to handle shutdown
shutdown() {
echo ""
echo "Shutting down agents..."
kill -TERM $RESEARCH_PID $SYNTHESIS_PID $VERIFICATION_PID $ORCHESTRATION_PID 2>/dev/null || true
wait $RESEARCH_PID $SYNTHESIS_PID $VERIFICATION_PID $ORCHESTRATION_PID 2>/dev/null || true
echo "All agents stopped."
exit 0
}
# Trap signals
trap shutdown SIGTERM SIGINT
# Wait for all background processes
wait $RESEARCH_PID $SYNTHESIS_PID $VERIFICATION_PID $ORCHESTRATION_PID