han145 commited on
Commit
70fbc7c
·
verified ·
1 Parent(s): c7f81f3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +49 -24
Dockerfile CHANGED
@@ -68,30 +68,55 @@ python3 /usr/local/bin/sync.py restore\n\
68
  CLEAN_BASE=\$(echo \"\$OPENAI_API_BASE\" | sed \"s|/chat/completions||g\" | sed \"s|/v1/|/v1|g\" | sed \"s|/v1\$|/v1|g\")\n\
69
  \n\
70
  # 阶段 2: 生成网关与模型配置\n\
71
- cat > /root/.openclaw/openclaw.json <<EOF\n\
72
- {\n\
73
- \"models\": {\n\
74
- \"providers\": {\n\
75
- \"huggingface\": {\n\
76
- \"baseUrl\": \"\$CLEAN_BASE\", \"apiKey\": \"\$OPENAI_API_KEY\", \"api\": \"openai-completions\",\n\
77
- \"models\": [{ \"id\": \"\$MODEL\", \"name\": \"wen1.5-0.5B-Chat\", \"contextWindow\": 128000 }]\n\
78
- }\n\
79
- }\n\
80
- },\n\
81
- \"agents\": { \"defaults\": { \"model\": { \"primary\": \"huggingface/\$MODEL\" } } },\n\
82
- \"gateway\": {\n\
83
- \"mode\": \"local\", \"bind\": \"lan\", \"port\": \$PORT,\n\
84
- \"trustedProxies\": [\"0.0.0.0/0\", \"10.0.0.0/8\", \"172.16.0.0/12\", \"192.168.0.0/16\"],\n\
85
- \"auth\": { \"mode\": \"token\", \"token\": \"\$OPENCLAW_GATEWAY_PASSWORD\" },\n\
86
- \"controlUi\": {\n\
87
- \"enabled\": true,\n\
88
- \"allowInsecureAuth\": true,\n\
89
- \"dangerouslyAllowHostHeaderOriginFallback\": true\n\
90
- \"dangerouslyDisableDeviceAuth\": true\n\
91
- }\n\
92
- }\n\
93
- }\n\
94
- EOF\n\
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  \n\
96
  # 增量备份循环 (每 6 小时)\n\
97
  (while true; do sleep 21600; python3 /usr/local/bin/sync.py backup; done) &\n\
 
68
  CLEAN_BASE=\$(echo \"\$OPENAI_API_BASE\" | sed \"s|/chat/completions||g\" | sed \"s|/v1/|/v1|g\" | sed \"s|/v1\$|/v1|g\")\n\
69
  \n\
70
  # 阶段 2: 生成网关与模型配置\n\
71
+ cat > /root/.openclaw/openclaw.json << 'EOF'
72
+ {
73
+ "models": {
74
+ "providers": {
75
+ "huggingface": {
76
+ "baseUrl": "$CLEAN_BASE",
77
+ "apiKey": "$OPENAI_API_KEY",
78
+ "api": "openai-completions",
79
+ "models": [
80
+ {
81
+ "id": "$MODEL",
82
+ "name": "wen1.5-0.5B-Chat",
83
+ "contextWindow": 128000
84
+ }
85
+ ]
86
+ }
87
+ }
88
+ },
89
+ "agents": {
90
+ "defaults": {
91
+ "model": {
92
+ "primary": "huggingface/$MODEL"
93
+ }
94
+ }
95
+ },
96
+ "gateway": {
97
+ "mode": "local",
98
+ "bind": "lan",
99
+ "port": $PORT,
100
+ "trustedProxies": [
101
+ "0.0.0.0/0",
102
+ "10.0.0.0/8",
103
+ "10.16.0.0/12",
104
+ "172.16.0.0/12",
105
+ "192.168.0.0/16"
106
+ ],
107
+ "auth": {
108
+ "mode": "token",
109
+ "token": "$OPENCLAW_GATEWAY_PASSWORD"
110
+ },
111
+ "controlUi": {
112
+ "enabled": true,
113
+ "allowInsecureAuth": true,
114
+ "dangerouslyAllowHostHeaderOriginFallback": true,
115
+ "dangerouslyDisableDeviceAuth": true
116
+ }
117
+ }
118
+ }
119
+ EOF
120
  \n\
121
  # 增量备份循环 (每 6 小时)\n\
122
  (while true; do sleep 21600; python3 /usr/local/bin/sync.py backup; done) &\n\