jamesw853 commited on
Commit
bfb60d6
·
verified ·
1 Parent(s): 00c1284

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +5 -2
entrypoint.sh CHANGED
@@ -1,7 +1,10 @@
1
  #!/bin/bash
2
  set -e
3
 
4
- # 启动 opencode serve 后台进程(正确参数:--hostname, --port, --print-logs)
 
 
 
5
  /home/user/.opencode/bin/opencode serve \
6
  --hostname 0.0.0.0 \
7
  --port 7860 \
@@ -12,7 +15,7 @@ OPCODE_PID=$!
12
  python3 /home/user/sync_to_dataset.py &
13
  SYNC_PID=$!
14
 
15
- # 等待任意子进程退出(如果 opencode 崩溃,容器退出)
16
  wait -n
17
 
18
  # 退出时杀死另一个进程
 
1
  #!/bin/bash
2
  set -e
3
 
4
+ export XDG_DATA_HOME=/data
5
+ export OPENCODE_DATA_DIR=/data
6
+
7
+ # 启动 opencode serve(后台)
8
  /home/user/.opencode/bin/opencode serve \
9
  --hostname 0.0.0.0 \
10
  --port 7860 \
 
15
  python3 /home/user/sync_to_dataset.py &
16
  SYNC_PID=$!
17
 
18
+ # 等待任意子进程退出
19
  wait -n
20
 
21
  # 退出时杀死另一个进程