document docker build line ending fix

This commit is contained in:
2026-07-15 01:54:56 +08:00
parent f3303b3b26
commit f49b8a51ec

View File

@@ -825,3 +825,58 @@ ENGINEX_MOE_TINY_MAX=4
- 本轮更有价值的对比是 `tokenwise``bmm` 两种 tiny implementation。 - 本轮更有价值的对比是 `tokenwise``bmm` 两种 tiny implementation。
从本轮结果看,在 `T≈2` 的短输出 decode 场景里,`bmm` 路径不差于 `tokenwise`,并且本次最佳是 `bmm_max8`。下一步如果要验证“`T` 大于阈值后分块计算”的思路,需要把 `max_num_seqs` 提到 8 或 16或构造能让单步 decode 聚合更多 token 的压测,否则 `TINY_MAX` 参数不会真正生效。 从本轮结果看,在 `T≈2` 的短输出 decode 场景里,`bmm` 路径不差于 `tokenwise`,并且本次最佳是 `bmm_max8`。下一步如果要验证“`T` 大于阈值后分块计算”的思路,需要把 `max_num_seqs` 提到 8 或 16或构造能让单步 decode 聚合更多 token 的压测,否则 `TINY_MAX` 参数不会真正生效。
## 2026-07-15Docker build CRLF 根因修复
### 现象
平台持续提示 Docker 镜像构建失败。将当前 Git HEAD 通过 `git archive` 打包到远端 Linux 后执行:
```bash
cd /root/work/submission_head/qwen3_6_scripts
./patch_ops.sh
```
首次复现到错误:
```text
./patch_ops.sh: line 11: $'\r': command not found
./patch_ops.sh: line 217: syntax error: unexpected end of file
```
### 根因
本地 Git 配置 `core.autocrlf=true`。在没有 `.gitattributes` 约束时,`git archive` 导出的 `patch_ops.sh` 变成 CRLF 行尾。Linux/Docker 中执行 `RUN cd ./qwen3_6_scripts && ./patch_ops.sh` 会直接失败。
### 修复
新增 `.gitattributes`,强制构建相关文本文件以 LF 行尾导出:
```text
Dockerfile text eol=lf
*.sh text eol=lf
*.py text eol=lf
*.yaml text eol=lf
*.yml text eol=lf
*.jinja text eol=lf
```
重新 `git archive HEAD` 后,本地确认 `patch_ops.sh` 行尾为 LF。再传到远端执行`patch_ops.sh` 已完整跑通,末尾验证:
```text
[ok] MOE_NATIVE
[ok] _native_experts_sorted
[ok] CHUNK_PARALLEL
[ok] LOOP1_NATIVE
[ok] RMSNORM_NATIVE
[ok] PREFIX_FLASH
[ok] _forward_prefix_flash
[ok] libcusolver.so link
[ok] /workspace/chat_template_multi_system.jinja
[ok] torch.linalg.solve_triangular callable
=> all five optimizations deployed and enabled
```
对应远端日志:
- `/root/work/logs/patch_head_lf_20260715.log`