Arshit Malik commited on
Commit
1b1a273
·
1 Parent(s): 60c0b01

fix: use python3 -m openclaw, keep health server until gateway responds

Browse files
Files changed (1) hide show
  1. start.sh +13 -3
start.sh CHANGED
@@ -112,7 +112,7 @@ for i in $(seq 1 30); do
112
  sleep 2
113
  done
114
 
115
- echo "[boot] Downloading DeepSeek R1 Distill Qwen 14B IQ2_XS..."
116
  python3 << PYEOF
117
  import subprocess, sys, os
118
  from pathlib import Path
@@ -141,10 +141,20 @@ subprocess.run(["ollama", "create", "deepseek-qwen-14b", "-f", "/tmp/Modelfile"]
141
  Path(gguf_path).unlink()
142
  PYEOF
143
 
144
- kill $HEALTH_PID 2>/dev/null
145
  echo "[boot] Starting OpenClaw gateway..."
146
- openclaw gateway &
147
  OPENCLAW_PID=$!
 
 
 
 
 
 
 
 
 
 
 
148
  echo "[boot] Deployment complete. PID: $OPENCLAW_PID"
149
  wait $OPENCLAW_PID 2>/dev/null
150
  sleep infinity
 
112
  sleep 2
113
  done
114
 
115
+ echo "[boot] Building DeepSeek R1 Distill Qwen 14B IQ2_XS model..."
116
  python3 << PYEOF
117
  import subprocess, sys, os
118
  from pathlib import Path
 
141
  Path(gguf_path).unlink()
142
  PYEOF
143
 
 
144
  echo "[boot] Starting OpenClaw gateway..."
145
+ python3 -m openclaw gateway &
146
  OPENCLAW_PID=$!
147
+
148
+ echo "[boot] Waiting for OpenClaw gateway on port 8080..."
149
+ for i in $(seq 1 30); do
150
+ if curl -sf http://127.0.0.1:8080/health > /dev/null 2>&1; then
151
+ echo "[boot] OpenClaw gateway ready after ${i}s"
152
+ break
153
+ fi
154
+ sleep 2
155
+ done
156
+
157
+ kill $HEALTH_PID 2>/dev/null
158
  echo "[boot] Deployment complete. PID: $OPENCLAW_PID"
159
  wait $OPENCLAW_PID 2>/dev/null
160
  sleep infinity