Skip to content

Commit 11a79dc

Browse files
author
Your Name
committed
new
1 parent c8a39b3 commit 11a79dc

File tree

3 files changed

+421
-223
lines changed

3 files changed

+421
-223
lines changed

DOC.md

100755100644
Lines changed: 163 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,189 @@
1-
# Documentation For VeRL-OSWorld
1+
Here is a structured `README.md` based on your instructions. All Chinese comments and descriptions have been translated into English.
22

3+
-----
4+
5+
# DART-GUI Training & Rollout System Setup
6+
7+
This guide provides instructions for setting up the DART-GUI environment, including Docker container initialization, database schema configuration, and execution scripts for sampling and training.
8+
9+
## 1\. Preparation
10+
11+
### Download Docker Images
12+
13+
Pull the required images for the GUI agent and the database.
14+
15+
```bash
16+
# DART-GUI Image
17+
docker pull crpi-iwtwdoj3ikoon38c.cn-beijing.personal.cr.aliyuncs.com/pengxiangli1999/dart-gui:v0
18+
19+
# MySQL Image
20+
docker pull mysql:8.0.44-debian
21+
```
22+
23+
### Prepare Model Checkpoints
24+
25+
Download the `UI-TARS-1.5-7B` model using the HuggingFace CLI. Replace `<your local path>` with your actual directory.
326

4-
### 和官方仓库进行同步
5-
一个很好的实践是每隔一段时间尝试同步官方verl仓库的改动进入本仓库
6-
本文档描述了如何将上游仓库(volcengine/verl)的最新更新同步到你的fork仓库(Computer-use-agents/verl)。
727
```bash
8-
# 查看当前远程仓库配置
9-
git remote -v
28+
huggingface-cli download ByteDance-Seed/UI-TARS-1.5-7B --local-dir <your local path>
29+
```
30+
31+
-----
32+
33+
## 2\. Docker Initialization
34+
35+
Initialize the containers on your **GPU Machine**. Ensure you replace specific paths (like MySQL volume) with your local paths.
1036

11-
# 输出示例:
12-
# origin https://github.com/volcengine/verl.git (fetch)
13-
# origin https://github.com/volcengine/verl.git (push)
14-
# origin_cua git@github.com:Computer-use-agents/verl.git (fetch)
15-
# origin_cua git@github.com:Computer-use-agents/verl.git (push)
37+
### Rollouter Container
38+
39+
Used for the rollout service.
40+
41+
```bash
42+
docker run -dit \
43+
--name rollouter \
44+
--gpus all \
45+
-p 6008:6008 \
46+
-p 8881:8881 \
47+
-p 15959:15959 \
48+
--shm-size=200g \
49+
crpi-iwtwdoj3ikoon38c.cn-beijing.personal.cr.aliyuncs.com/pengxiangli1999/dart-gui:v0
1650
```
1751

18-
- `origin`: 上游仓库(volcengine/verl)
19-
- `origin_cua`: 你的fork仓库(Computer-use-agents/verl)
20-
如果你找不到两个remote,可以google下如何增加remote。
21-
### 同步步骤
52+
### Trainer Container
2253

23-
#### 1. 获取上游更新
54+
Used for model training.
2455

2556
```bash
26-
# 从上游仓库获取最新代码
27-
git fetch origin
57+
docker run -dit \
58+
--name trainer \
59+
--gpus all \
60+
-p 6009:6008 \
61+
-p 8882:8881 \
62+
-p 15960:15959 \
63+
--shm-size=1500g \
64+
crpi-iwtwdoj3ikoon38c.cn-beijing.personal.cr.aliyuncs.com/pengxiangli1999/dart-gui:v0
2865
```
2966

30-
#### 2. 切换到主分支
67+
### MySQL Container
68+
69+
Database server for tracking runs and checkpoints. Replace `<your sql default path>` with your local storage path.
3170

3271
```bash
33-
# 切换到主分支(通常是 main 或 master)
34-
git checkout main
72+
docker run -dit \
73+
--name mysql-server \
74+
-p 3306:3306 \
75+
-e MYSQL_ROOT_PASSWORD=admin \
76+
-v <your sql default path>:/var/lib/mysql \
77+
mysql:8.0.44-debian
78+
```
79+
80+
-----
81+
82+
## 3\. Database Configuration
83+
84+
Connect to your MySQL container and initialize the tables using the SQL below.
85+
86+
**Database Credentials:**
87+
88+
* **User:** root
89+
* **Password:** admin
90+
* **Port:** 3306
91+
92+
### SQL Schema
93+
94+
```sql
95+
--
96+
-- Table structure for table `rollout_run`
97+
--
98+
99+
DROP TABLE IF EXISTS `rollout_run`;
100+
/*!40101 SET @saved_cs_client = @@character_set_client */;
101+
/*!50503 SET character_set_client = utf8mb4 */;
102+
CREATE TABLE `rollout_run` (
103+
`id` bigint NOT NULL AUTO_INCREMENT,
104+
`run_id` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
105+
`trajectory_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
106+
`task_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
107+
`trace_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
108+
`split_dir` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
109+
`reward` double DEFAULT NULL,
110+
`num_chunks` int DEFAULT NULL,
111+
`used` int NOT NULL DEFAULT '0',
112+
`model_version` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
113+
`instruction` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
114+
`create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
115+
PRIMARY KEY (`id`),
116+
UNIQUE KEY `uq_rollout_run_id` (`id`),
117+
UNIQUE KEY `uk_rollout_run_traj_run` (`trajectory_id`,`run_id`),
118+
KEY `idx_rollout_run_task` (`task_id`)
119+
) ENGINE=InnoDB AUTO_INCREMENT=1319846 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
120+
/*!40101 SET character_set_client = @saved_cs_client */;
121+
122+
--
123+
-- Table structure for table `checkpoint`
124+
--
125+
126+
DROP TABLE IF EXISTS `checkpoint`;
127+
/*!40101 SET @saved_cs_client = @@character_set_client */;
128+
/*!50503 SET character_set_client = utf8mb4 */;
129+
CREATE TABLE `checkpoint` (
130+
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'Primary Key ID',
131+
`name` varchar(50) NOT NULL DEFAULT '' COMMENT 'Checkpoint Name (Unique English Identifier)',
132+
`version` varchar(50) NOT NULL COMMENT 'Version Number (Semantic Versioning, e.g., v1.0.0)',
133+
`run_id` varchar(191) NOT NULL DEFAULT '',
134+
`status` varchar(20) NOT NULL DEFAULT 'PENDING' COMMENT 'Status: PENDING|RUNNING|COMPLETED|FAILED|DEPRECATED',
135+
`path` varchar(255) NOT NULL COMMENT 'Storage Path (e.g., s3://bucket/path/checkpoint.ckpt)',
136+
`source` varchar(50) DEFAULT NULL COMMENT 'Source (e.g., User Upload/Training Generated/System Migration)',
137+
`operator` varchar(50) DEFAULT NULL COMMENT 'Operator (User ID or System Account)',
138+
`remark` varchar(1024) DEFAULT NULL COMMENT 'Remark (Free text format)',
139+
`config_yaml` text COMMENT 'Full Deployment Config (Encrypted Storage)',
140+
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
141+
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Last Updated At',
142+
`deleted_at` timestamp NULL DEFAULT NULL COMMENT 'Soft Delete Time',
143+
`started_at` timestamp NULL DEFAULT NULL COMMENT 'Started At',
144+
`finished_at` timestamp NULL DEFAULT NULL COMMENT 'Finished At',
145+
PRIMARY KEY (`id`),
146+
KEY `idx_status` (`status`),
147+
KEY `idx_created_at` (`created_at`),
148+
KEY `idx_updated_at` (`updated_at`)
149+
) ENGINE=InnoDB AUTO_INCREMENT=3117 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Model Checkpoint Table (Records training checkpoints and deployment versions)';
150+
/*!40101 SET character_set_client = @saved_cs_client */;
35151
```
36152

37-
#### 3. 合并上游更新
153+
-----
38154

39-
选择以下任一方式:
155+
## 4\. Environment Setup (CPU Machine)
40156

41-
方式一:使用 merge(推荐,保留完整历史)
157+
Please follow the instructions in the repository below to initialize the environment on your **CPU machine**:
158+
159+
* **Repository:** [GUI-Docker-Env](https://github.com/Computer-use-agents/GUI-Docker-Env.git)
160+
161+
-----
162+
163+
## 5\. Execution
164+
165+
### Step 1: Start Rollouter (GPU Machine)
166+
167+
Inside the `rollouter` docker container:
42168

43169
```bash
44-
# 将上游更新合并到当前分支
45-
git merge origin/main
170+
sh model_service.sh
46171
```
47172

48-
方式二:使用 rebase(保持提交历史整洁)
173+
### Step 2: Start Agent Runner (CPU Machine)
174+
175+
Inside the configured CPU environment:
49176

50177
```bash
51-
# 将当前分支的提交重新应用到上游更新之上
52-
git rebase origin/main
178+
sh run.sh
53179
```
54-
注意,这一步一般会有冲突,一定要手动解除,并且尝试通过测试验证同步是否有效。
55-
#### 4. 推送到你的fork
180+
181+
### Step 3: Start Training (GPU Machine)
182+
183+
Once the links are set up and data is flowing, start the training process inside the `trainer` docker container:
56184

57185
```bash
58-
# 将更新推送到你的fork仓库
59-
git push origin_cua main
60-
```
186+
sh examples/osworld/async/run_trainer_debug_w_rollout_stepwise_train_pt.sh
187+
```
188+
189+
### Would you like me to create a `docker-compose.yml` file to automate the container creation process?

0 commit comments

Comments
 (0)