mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 14:57:59 -05:00
Refactor llm config from toml and clean up (#6923)
This commit is contained in:
@@ -58,10 +58,11 @@ docker build -t custom_image .
|
||||
[core]
|
||||
workspace_base="./workspace"
|
||||
run_as_openhands=true
|
||||
sandbox_base_container_image="custom_image"
|
||||
[sandbox]
|
||||
base_container_image="custom_image"
|
||||
```
|
||||
|
||||
对于 `sandbox_base_container_image` 的值, 您可以选择以下任意一项:
|
||||
对于 `base_container_image` 的值, 您可以选择以下任意一项:
|
||||
1. 在上一步中您构建的自定义镜像的名称(例如,`“custom_image”`)
|
||||
2. 从 Docker Hub 拉取的镜像(例如,`“node:20”`,如果你需要一个预装 `Node.js` 的沙箱环境)
|
||||
|
||||
@@ -83,14 +84,15 @@ sandbox_base_container_image="custom_image"
|
||||
|
||||
### 错误:```useradd: UID 1000 is not unique```
|
||||
|
||||
如果在控制台输出中看到此错误,说明 OpenHands 尝试在沙箱中以 UID 1000 创建 openhands 用户,但该 UID 已经被映像中的其他部分使用(不知何故)。要解决这个问题,请更改 config.toml 文件中的 sandbox_user_id 字段为不同的值:
|
||||
如果在控制台输出中看到此错误,说明 OpenHands 尝试在沙箱中以 UID 1000 创建 openhands 用户,但该 UID 已经被映像中的其他部分使用(不知何故)。要解决这个问题,请更改 config.toml 文件中的 user_id 字段为不同的值:
|
||||
|
||||
```
|
||||
[core]
|
||||
workspace_base="./workspace"
|
||||
run_as_openhands=true
|
||||
sandbox_base_container_image="custom_image"
|
||||
sandbox_user_id="1001"
|
||||
[sandbox]
|
||||
base_container_image="custom_image"
|
||||
user_id="1001"
|
||||
```
|
||||
|
||||
### 端口使用错误
|
||||
|
||||
@@ -42,12 +42,13 @@ docker build -t custom-image .
|
||||
|
||||
### 指定基础沙箱镜像
|
||||
|
||||
在 OpenHands 目录中的 `config.toml` 文件中,将 `sandbox_base_container_image` 设置为你要使用的镜像。这可以是你已经拉取的镜像或你构建的镜像:
|
||||
在 OpenHands 目录中的 `config.toml` 文件中,将 `base_container_image` 设置为你要使用的镜像。这可以是你已经拉取的镜像或你构建的镜像:
|
||||
|
||||
```bash
|
||||
[core]
|
||||
...
|
||||
sandbox_base_container_image="custom-image"
|
||||
[sandbox]
|
||||
base_container_image="custom-image"
|
||||
```
|
||||
|
||||
### 运行
|
||||
|
||||
Reference in New Issue
Block a user