Tea78 commited on
Commit
fb4ce02
·
verified ·
1 Parent(s): 0bebd3a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -2
Dockerfile CHANGED
@@ -2,8 +2,41 @@ FROM node:22-slim
2
  RUN apt-get update && apt-get install -y curl git
3
  RUN npm install -g openclaw@latest
4
 
5
- # 创建最小配置
6
- RUN mkdir -p /root/.openclaw && echo '{"gateway":{"mode":"local"}}' > /root/.openclaw/openclaw.json
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
  EXPOSE 3000
9
  CMD ["openclaw", "gateway", "run", "--port", "3000", "--verbose"]
 
2
  RUN apt-get update && apt-get install -y curl git
3
  RUN npm install -g openclaw@latest
4
 
5
+ # 创建强制使用Nvidia的配置文件
6
+ RUN mkdir -p /root/.openclaw && cat > /root/.openclaw/openclaw.json << 'EOF'
7
+ {
8
+ "gateway": {
9
+ "mode": "local",
10
+ "auth": {
11
+ "mode": "token",
12
+ "token": "$OPENCLAW_GATEWAY_TOKEN"
13
+ }
14
+ },
15
+ "models": {
16
+ "providers": {
17
+ "nvidia": {
18
+ "baseUrl": "https://build.nvidia.com/v1",
19
+ "apiKey": "$OPENAI_API_KEY",
20
+ "api": "openai-completions",
21
+ "models": [
22
+ {
23
+ "id": "$MODEL",
24
+ "name": "Kimi K2.5",
25
+ "contextWindow": 256000
26
+ }
27
+ ]
28
+ }
29
+ }
30
+ },
31
+ "agents": {
32
+ "defaults": {
33
+ "model": {
34
+ "primary": "nvidia/$MODEL"
35
+ }
36
+ }
37
+ }
38
+ }
39
+ EOF
40
 
41
  EXPOSE 3000
42
  CMD ["openclaw", "gateway", "run", "--port", "3000", "--verbose"]