Skip to content

Commit 3141ac1

Browse files
committed
[docs] docs: update Docker installation guide
1 parent 175ff12 commit 3141ac1

2 files changed

Lines changed: 133 additions & 3 deletions

File tree

docs/source/get_started/installation.md

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,83 @@ After the build finishes, verify:
8383
docker images | grep loongforge
8484
```
8585

86+
### Pre-built Docker Images
87+
88+
LoongForge Docker images are available on Docker Hub:
89+
[https://hub.docker.com/u/loongforge](https://hub.docker.com/u/loongforge).
90+
91+
LoongForge publishes versioned pre-built Docker images. Select the desired tag
92+
from Docker Hub. LeRobot images use the same version tag with a `_lerobot` suffix
93+
when available.
94+
95+
| Image | Tag Pattern | Description |
96+
|---|---|---|
97+
| `loongforge/loongforge` | `<version>` | Base image: LLM / VLM / Diffusion training only |
98+
| `loongforge/loongforge` | `<version>_lerobot` | Includes LeRobot dependencies for VLA training (Pi0.5 + GR00T) |
99+
100+
```bash
101+
# Set the version tag you want to use, for example: 0.1.1
102+
LOONGFORGE_VERSION=<version>
103+
104+
# Pull the base image
105+
docker pull loongforge/loongforge:${LOONGFORGE_VERSION}
106+
107+
# Pull the image with LeRobot support
108+
docker pull loongforge/loongforge:${LOONGFORGE_VERSION}_lerobot
109+
```
110+
111+
#### Dual Python Environment in the LeRobot Image
112+
113+
The LeRobot image (`<version>_lerobot`) uses a **dual virtual-environment** setup to resolve
114+
dependency conflicts between Pi0.5 and GR00T:
115+
116+
| Environment | Path | Default? | Use Case |
117+
|---|---|---|---|
118+
| Base (Pi0.5) | System Python | Yes | Pi0.5 VLA training |
119+
| GR00T | `/opt/venvs/gr00t` | No | GR00T-N1.6 VLA training |
120+
121+
**To activate the GR00T environment inside the container:**
122+
123+
```bash
124+
source /opt/venvs/gr00t/bin/activate
125+
# or use the convenience alias:
126+
use-gr00t
127+
```
128+
129+
**To return to the base (Pi0.5) environment:**
130+
131+
```bash
132+
deactivate
133+
```
134+
135+
**For distributed training, use the venv's torchrun:**
136+
137+
```bash
138+
/opt/venvs/gr00t/bin/torchrun ${DISTRIBUTED_ARGS[@]} ...
139+
```
140+
86141
### Run the container
87142

88143
```bash
144+
# Set the version tag you want to use, for example: 0.1.1
145+
LOONGFORGE_VERSION=<version>
146+
147+
# Using the base image (LLM/VLM/Diffusion)
148+
docker run --runtime=nvidia --gpus all -itd --rm \
149+
-v /path/to/your/hf/models:/mnt/cluster/huggingface.co/ \
150+
-v /path/to/data:/mnt/cluster/LoongForge/ \
151+
loongforge/loongforge:${LOONGFORGE_VERSION} /bin/bash
152+
153+
# Using the LeRobot image (VLA: Pi0.5 + GR00T)
89154
docker run --runtime=nvidia --gpus all -itd --rm \
90155
-v /path/to/your/hf/models:/mnt/cluster/huggingface.co/ \
91156
-v /path/to/data:/mnt/cluster/LoongForge/ \
92-
loongforge:latest /bin/bash
157+
loongforge/loongforge:${LOONGFORGE_VERSION}_lerobot /bin/bash
93158
```
94159

95160
Once inside the container, navigate to `/workspace/LoongForge/examples/` and
96-
launch the desired training script.
161+
launch the desired training script. For GR00T training, remember to activate
162+
the GR00T virtual environment first (see Dual Python Environment above).
97163

98164
---
99165

docs/source_zh/get_started/installation.md

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,80 @@ docker build --build-arg COMPILE_ENV=hopper --build-arg ENABLE_LEROBOT=false \
7575
docker images | grep loongforge
7676
```
7777

78+
### 预构建 Docker 镜像
79+
80+
LoongForge Docker 镜像保存在 Docker Hub:
81+
[https://hub.docker.com/u/loongforge](https://hub.docker.com/u/loongforge)
82+
83+
LoongForge 发布带版本号的预构建 Docker 镜像。请在 Docker Hub 中选择需要的 tag。
84+
LeRobot 镜像在可用时使用相同版本号并追加 `_lerobot` 后缀。
85+
86+
| 镜像 | 标签模式 | 描述 |
87+
|---|---|---|
88+
| `loongforge/loongforge` | `<version>` | 基础镜像:仅支持 LLM / VLM / Diffusion 训练 |
89+
| `loongforge/loongforge` | `<version>_lerobot` | 包含 VLA 训练(Pi0.5 + GR00T)的 LeRobot 依赖 |
90+
91+
```bash
92+
# 设置需要使用的版本 tag,例如:0.1.1
93+
LOONGFORGE_VERSION=<version>
94+
95+
# 拉取基础镜像
96+
docker pull loongforge/loongforge:${LOONGFORGE_VERSION}
97+
98+
# 拉取带 LeRobot 支持的镜像
99+
docker pull loongforge/loongforge:${LOONGFORGE_VERSION}_lerobot
100+
```
101+
102+
#### LeRobot 镜像中的双 Python 环境
103+
104+
LeRobot 镜像(`<version>_lerobot`)使用**双虚拟环境**方案解决 Pi0.5 和 GR00T 之间的依赖冲突:
105+
106+
| 环境 | 路径 | 是否默认 | 用途 |
107+
|---|---|---|---|
108+
| 基础环境(Pi0.5) | 系统 Python || Pi0.5 VLA 训练 |
109+
| GR00T | `/opt/venvs/gr00t` || GR00T-N1.6 VLA 训练 |
110+
111+
**在容器中激活 GR00T 环境:**
112+
113+
```bash
114+
source /opt/venvs/gr00t/bin/activate
115+
# 或使用快捷命令:
116+
use-gr00t
117+
```
118+
119+
**返回基础(Pi0.5)环境:**
120+
121+
```bash
122+
deactivate
123+
```
124+
125+
**分布式训练请使用虚拟环境内的 torchrun:**
126+
127+
```bash
128+
/opt/venvs/gr00t/bin/torchrun ${DISTRIBUTED_ARGS[@]} ...
129+
```
130+
78131
### 运行容器
79132

80133
```bash
134+
# 设置需要使用的版本 tag,例如:0.1.1
135+
LOONGFORGE_VERSION=<version>
136+
137+
# 使用基础镜像(LLM/VLM/Diffusion)
138+
docker run --runtime=nvidia --gpus all -itd --rm \
139+
-v /path/to/your/hf/models:/mnt/cluster/huggingface.co/ \
140+
-v /path/to/data:/mnt/cluster/LoongForge/ \
141+
loongforge/loongforge:${LOONGFORGE_VERSION} /bin/bash
142+
143+
# 使用 LeRobot 镜像(VLA: Pi0.5 + GR00T)
81144
docker run --runtime=nvidia --gpus all -itd --rm \
82145
-v /path/to/your/hf/models:/mnt/cluster/huggingface.co/ \
83146
-v /path/to/data:/mnt/cluster/LoongForge/ \
84-
loongforge:latest /bin/bash
147+
loongforge/loongforge:${LOONGFORGE_VERSION}_lerobot /bin/bash
85148
```
86149

87150
进入容器后,导航到 `/workspace/LoongForge/examples/` 并启动所需的训练脚本。
151+
对于 GR00T 训练,请先激活 GR00T 虚拟环境(参见上方双 Python 环境说明)。
88152

89153
---
90154

0 commit comments

Comments
 (0)