|
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. |
2 | 2 |
|
| 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. |
3 | 26 |
|
4 | | -### 和官方仓库进行同步 |
5 | | -一个很好的实践是每隔一段时间尝试同步官方verl仓库的改动进入本仓库 |
6 | | -本文档描述了如何将上游仓库(volcengine/verl)的最新更新同步到你的fork仓库(Computer-use-agents/verl)。 |
7 | 27 | ```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. |
10 | 36 |
|
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 |
16 | 50 | ``` |
17 | 51 |
|
18 | | -- `origin`: 上游仓库(volcengine/verl) |
19 | | -- `origin_cua`: 你的fork仓库(Computer-use-agents/verl) |
20 | | -如果你找不到两个remote,可以google下如何增加remote。 |
21 | | -### 同步步骤 |
| 52 | +### Trainer Container |
22 | 53 |
|
23 | | -#### 1. 获取上游更新 |
| 54 | +Used for model training. |
24 | 55 |
|
25 | 56 | ```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 |
28 | 65 | ``` |
29 | 66 |
|
30 | | -#### 2. 切换到主分支 |
| 67 | +### MySQL Container |
| 68 | + |
| 69 | +Database server for tracking runs and checkpoints. Replace `<your sql default path>` with your local storage path. |
31 | 70 |
|
32 | 71 | ```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 */; |
35 | 151 | ``` |
36 | 152 |
|
37 | | -#### 3. 合并上游更新 |
| 153 | +----- |
38 | 154 |
|
39 | | -选择以下任一方式: |
| 155 | +## 4\. Environment Setup (CPU Machine) |
40 | 156 |
|
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: |
42 | 168 |
|
43 | 169 | ```bash |
44 | | -# 将上游更新合并到当前分支 |
45 | | -git merge origin/main |
| 170 | +sh model_service.sh |
46 | 171 | ``` |
47 | 172 |
|
48 | | -方式二:使用 rebase(保持提交历史整洁) |
| 173 | +### Step 2: Start Agent Runner (CPU Machine) |
| 174 | + |
| 175 | +Inside the configured CPU environment: |
49 | 176 |
|
50 | 177 | ```bash |
51 | | -# 将当前分支的提交重新应用到上游更新之上 |
52 | | -git rebase origin/main |
| 178 | +sh run.sh |
53 | 179 | ``` |
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: |
56 | 184 |
|
57 | 185 | ```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