docs(pd): 补充运维一键部署完整步骤(干净环境从零到跑通)
- experiments README 新增「运维一键部署」章节:6 步完整流程 (免密/文件分发/仓库 clone/拉镜像/启动/验证)+ 停止重启 + 文件来源 - docs/KIMI_K3_DEPLOY.md 附录 B 新增 B.2 运维准备,编号顺延 B.3-B.6 - 修复 scp 分发命令(先建父目录)
This commit is contained in:
parent
ddf807d458
commit
fe375e1307
@ -216,7 +216,18 @@ FlashKDA(MoonshotAI CUTLASS KDA 内核,支持 sm_120)可作为 KDA prefill
|
|||||||
└───────────────────┘
|
└───────────────────┘
|
||||||
```
|
```
|
||||||
|
|
||||||
### B.2 一键部署
|
### B.2 运维准备(一次性,新环境才需执行)
|
||||||
|
|
||||||
|
已部署过的集群可跳过本节。步骤顺序:
|
||||||
|
|
||||||
|
1. **免密与文件就位**:确保 8 节点互信、docker 可用;把 `patch_k3_sm120.py`、`flash_kda-*.whl`、mooncake wheel 分发到 8 节点(路径见附录 B.2 下方说明)。
|
||||||
|
2. **sskj 仓库**:`.5` 和 `.1` 都需 clone `/data/yy/sskj`(deploy_pd.sh 的 deploy 层命令依赖)。
|
||||||
|
3. **拉镜像**:8 节点 `docker pull lmsysorg/sglang:kimi-k3`。
|
||||||
|
4. **GPU 空闲**:`nvidia-smi` 全 0 MiB,否则联系模型团队确认。
|
||||||
|
|
||||||
|
详细命令见 `experiments/pro6000/kimi3_pro6000_pd_rdma/README.md` 的「运维一键部署」章节(含每步的可执行命令与验证)。
|
||||||
|
|
||||||
|
### B.3 一键部署
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /data/yy/sskj/experiments/pro6000/kimi3_pro6000_pd_rdma
|
cd /data/yy/sskj/experiments/pro6000/kimi3_pro6000_pd_rdma
|
||||||
@ -226,7 +237,7 @@ bash deploy_pd.sh stop
|
|||||||
bash deploy_pd.sh restart
|
bash deploy_pd.sh restart
|
||||||
```
|
```
|
||||||
|
|
||||||
### B.3 验证
|
### B.4 验证
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 端到端(router 自动双发 P/D)
|
# 端到端(router 自动双发 P/D)
|
||||||
@ -236,7 +247,7 @@ curl -s http://174.1.60.5:31000/generate -H "Content-Type: application/json" \
|
|||||||
|
|
||||||
长输入验证(2026-08-11 实测):1680 / 5280 tokens 输入均正常,P 组 prefill ~112 tok/s,D 组 decode ~26 tok/s。
|
长输入验证(2026-08-11 实测):1680 / 5280 tokens 输入均正常,P 组 prefill ~112 tok/s,D 组 decode ~26 tok/s。
|
||||||
|
|
||||||
### B.4 关键注意事项(务必遵守)
|
### B.5 关键注意事项(务必遵守)
|
||||||
|
|
||||||
1. **禁止设置 `PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True`**
|
1. **禁止设置 `PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True`**
|
||||||
expandable_segments 分配的 GPU 段,mooncake RDMA 注册报 `Bad address [14]`
|
expandable_segments 分配的 GPU 段,mooncake RDMA 注册报 `Bad address [14]`
|
||||||
@ -247,7 +258,7 @@ curl -s http://174.1.60.5:31000/generate -H "Content-Type: application/json" \
|
|||||||
4. NCCL/GLOO 走计算网(`bond1` + `NCCL_IB_HCA=mlx5_0..3`),不要走管理网 bond0。
|
4. NCCL/GLOO 走计算网(`bond1` + `NCCL_IB_HCA=mlx5_0..3`),不要走管理网 bond0。
|
||||||
5. mc-master(mooncake 元数据服务)需先在 174.1.60.1 运行(deploy_pd.sh 自动处理)。
|
5. mc-master(mooncake 元数据服务)需先在 174.1.60.1 运行(deploy_pd.sh 自动处理)。
|
||||||
|
|
||||||
### B.5 与单组部署的取舍
|
### B.6 与单组部署的取舍
|
||||||
|
|
||||||
| 维度 | 单组 TP32×EP32 | PD 分离(MoonCake RDMA) |
|
| 维度 | 单组 TP32×EP32 | PD 分离(MoonCake RDMA) |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|
|||||||
@ -45,6 +45,101 @@ PD 分离部署(PD Disaggregation)将 prefill(预填充,计算密集型
|
|||||||
mc-master (174.1.60.1:50051) MoonCake 元数据服务
|
mc-master (174.1.60.1:50051) MoonCake 元数据服务
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 运维一键部署(从干净环境到跑通)
|
||||||
|
|
||||||
|
以下是运维同学按顺序执行即可完成整套 PD 部署的完整步骤。**前 4 步是"一次性准备"**(新机器/新环境才需要;已部署过的集群可跳过,直接看第 5 步)。
|
||||||
|
|
||||||
|
### 步骤 1:准备 8 节点环境(一次性)
|
||||||
|
|
||||||
|
前置:8 台节点(174.1.60.1~8)已安装 NVIDIA 驱动 + CUDA + Docker,GPU 空闲(`nvidia-smi` 全 0 MiB)。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 在任意一台(建议 .5)确认能免密 ssh 到全部 8 节点
|
||||||
|
for i in 1 2 3 4 5 6 7 8; do ssh 174.1.60.$i hostname; done
|
||||||
|
# 若某台需密码,先配免密(把公钥分发过去)
|
||||||
|
ssh-copy-id root@174.1.60.$i # 对每台执行
|
||||||
|
```
|
||||||
|
|
||||||
|
### 步骤 2:分发部署文件到 8 节点(一次性)
|
||||||
|
|
||||||
|
每台节点需要 3 个文件(patch 脚本 + flashkda wheel + mooncake wheel),放到指定路径:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 在 .5 上执行(假设文件已存在于 .5 的对应位置;若没有,先从模型团队获取)
|
||||||
|
FILES="/tmp/patch_k3_sm120.py
|
||||||
|
/tmp/flash_kda-0.0.1-cp312-cp312-linux_x86_64.whl
|
||||||
|
/data/flashkda_deploy/wheels/mooncake_transfer_engine_cuda13-0.3.12.post1-cp312-cp312-manylinux_2_28_x86_64.whl"
|
||||||
|
|
||||||
|
for h in 1 2 3 4 5 6 7 8; do
|
||||||
|
ssh 174.1.60.$h "mkdir -p /tmp /data/flashkda_deploy/wheels" # 确保父目录存在
|
||||||
|
for f in $FILES; do
|
||||||
|
scp -q $f 174.1.60.$h:/$f
|
||||||
|
done
|
||||||
|
echo " .$h 文件就位"
|
||||||
|
done
|
||||||
|
|
||||||
|
# 验证:每台应显示 3/3
|
||||||
|
for h in 1 2 3 4 5 6 7 8; do
|
||||||
|
echo -n " .$h: "
|
||||||
|
ssh 174.1.60.$h "ls /tmp/patch_k3_sm120.py /tmp/flash_kda-0.0.1-cp312-cp312-linux_x86_64.whl /data/flashkda_deploy/wheels/*.whl 2>/dev/null | wc -l"
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
|
### 步骤 3:部署 sskj 仓库到 .5 和 .1(一次性)
|
||||||
|
|
||||||
|
`deploy_pd.sh` 依赖 sskj 仓库:.5 上用于编排,.1 上用于执行 P 组 deploy 层命令。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# .5 上已有仓库则跳过;没有则 clone(在 .5 上执行)
|
||||||
|
git clone https://git.meta-stone.net/qqtang/sskj.git /data/yy/sskj
|
||||||
|
|
||||||
|
# .1 上也必须 clone(deploy_pd.sh 会在 .1 执行 python -m sskj.deploy)
|
||||||
|
ssh 174.1.60.1 "mkdir -p /data/yy && git clone https://git.meta-stone.net/qqtang/sskj.git /data/yy/sskj"
|
||||||
|
|
||||||
|
# 保持两边同步最新
|
||||||
|
cd /data/yy/sskj && git pull origin main
|
||||||
|
ssh 174.1.60.1 "cd /data/yy/sskj && git pull origin main"
|
||||||
|
```
|
||||||
|
|
||||||
|
### 步骤 4:拉取镜像(一次性)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
for h in 1 2 3 4 5 6 7 8; do
|
||||||
|
ssh 174.1.60.$h "docker pull lmsysorg/sglang:kimi-k3" &
|
||||||
|
done; wait
|
||||||
|
```
|
||||||
|
|
||||||
|
### 步骤 5:一键启动(每次部署执行)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /data/yy/sskj/experiments/pro6000/kimi3_pro6000_pd_rdma
|
||||||
|
bash deploy_pd.sh start
|
||||||
|
# 预计 12~18 分钟(模型加载 + CUDA graph + PD warmup)
|
||||||
|
```
|
||||||
|
|
||||||
|
### 步骤 6:验证
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 看状态
|
||||||
|
bash deploy_pd.sh status
|
||||||
|
|
||||||
|
# 端到端推理(应有正常文本返回)
|
||||||
|
curl -s http://174.1.60.5:31000/generate -H "Content-Type: application/json" -d '{"text":"Hello","sampling_params":{"max_new_tokens":16}}'
|
||||||
|
```
|
||||||
|
|
||||||
|
### 停止 / 重启
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bash deploy_pd.sh stop # router → D 组 → P 组 → mc-master
|
||||||
|
bash deploy_pd.sh restart
|
||||||
|
```
|
||||||
|
|
||||||
|
### 部署文件来源
|
||||||
|
|
||||||
|
- `patch_k3_sm120.py`、`flash_kda-0.0.1-*.whl`:模型团队产物(见 `docs/KIMI_K3_DEPLOY.md` 附录 A)
|
||||||
|
- `mooncake_transfer_engine_cuda13-0.3.12.post1-*.whl`:`/data/flashkda_deploy/wheels/`
|
||||||
|
- 若文件缺失,找模型团队提供或重新构建/下载
|
||||||
|
|
||||||
## 使用
|
## 使用
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user