[CI] Update build image to CUDA 12.8 and GCC 11#79340
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the CI “build” Docker image configuration to ensure the build container uses GCC/G++ 11 (meeting the C++20 baseline toolchain requirement introduced in #79260) and avoids continuing to hit cached images built from the older GCC 8.2-based Dockerfile name.
Changes:
- Switch the CE framework/build image Dockerfile name to
Dockerfile.cuda11.8_cudnn8_gcc11_trt8and base it onnvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04. - Update
make_ce_framework_dockerfilegeneration logic to installgcc-11/g++-11and relinkgcc/g++/ccto the GCC 11 toolchain paths. - Update the reusable GitHub Actions workflow to build/pull/cache using the new
docker_build_filename.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tools/dockerfile/ci_dockerfile.sh | Generates the updated CE framework/build Dockerfile (CUDA 11.8 + GCC/G++ 11 toolchain relinking). |
| .github/workflows/docker.yml | Points CI docker build job to the new build Dockerfile name so cache keys/images align with the updated toolchain. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CI报告基于以下代码生成(30分钟更新一次): 1 Required任务 : 34/39 通过
2 失败详情🔴 PR-CI-SOT / Build and Test — 环境问题:源码包下载失败(置信度: 高)失败用例:
关键日志:
修复建议:
关联变更: 无直接关联;失败发生在进入 SOT build/test 之前 🔴 Distribute-stable-build / Build — 环境问题:源码包下载失败(置信度: 高)失败用例:
关键日志:
修复建议:
关联变更: 无直接关联;失败发生在进入分布式 Build 之前 🔴 Linux-build / Build — PR问题:CUDA/GCC 编译不兼容(置信度: 高)失败用例:
关键日志:
修复建议:
关联变更: 🔴 PR-CI-Inference / Build — PR问题:CUDA/GCC 编译不兼容(置信度: 高)失败用例:
关键日志:
修复建议:
关联变更: |
…build-gcc11 # Conflicts: # tools/dockerfile/Dockerfile.ubuntu20
PaddlePaddle-bot
left a comment
There was a problem hiding this comment.
🤖 Paddle-CI-Agent | pr_review |
2026-07-02 13:07:34
📋 Review 摘要
PR 概述:将 task: build 的 CI Docker build image 从 CUDA 12.3 升级到 CUDA 12.4,并同步 CUDA Python wheel 依赖。
变更范围:.github/workflows/docker.yml、tools/dockerfile/ci_dockerfile.sh
影响面 Tag:[Environment Adaptation] [Execute Infrastructure]
问题
| 级别 | 文件 | 概述 |
|---|---|---|
| - | - | 未发现阻塞性问题。PR 规范问题在下面章节报,不在这里重复。 |
📝 PR 规范检查
标题 Tag [CI] 不在 Paddle PR 模板枚举中;描述结构包含必填的 PR Category、PR Types、Description 和 是否引起精度变化,且精度变化填写为 否,描述部分符合规范。
标题建议(可直接复制):
[Environment Adaptation] Update CI build image GCC to 11
总体评价
按 checklist A10 检查了 build workflow、Dockerfile 生成脚本、TensorRT/cuDNN/GCC 相关替换,以及 CUDA 12.4 wheel 版本与仓库 setup.py 维护组的一致性;未发现需要阻塞合入的代码问题。当前仍有历史标题 Tag 规范项未处理。
liuhao2638
left a comment
There was a problem hiding this comment.
已复查最新提交。当前 CUDA 12.4/GCC 11.5 组合仍会导致必需 build 任务在 profiler.cu 编译阶段失败,具体证据和建议已放在 inline review comment 里;这个问题需要修复后再合入。
| dockerfile_name="Dockerfile.cuda11.2_cudnn8_gcc82_trt8" | ||
| sed "s#<baseimg>#nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04#g" ./Dockerfile.ubuntu20 >${dockerfile_name} | ||
| dockerfile_name="Dockerfile.cuda12.4_cudnn9_gcc11_trt8" | ||
| sed "s#<baseimg>#nvidia/cuda:12.4.1-cudnn-devel-ubuntu20.04#g" ./Dockerfile.ubuntu20 >${dockerfile_name} |
There was a problem hiding this comment.
当前这组 CUDA 12.4 + GCC 11.5 镜像仍然会让必需的 build 任务失败,不能按描述中的“CUDA 12.4 避开 AMX 头文件问题”合入。当前 head 的 build docker images / Build docker 已用这个 Dockerfile 生成并推送了 b0993ba370677b1e3ded9b71ad018828;后续 Linux-build / Build 和 PR-CI-Inference / Build 都使用同一个镜像,并在 -- The CUDA compiler identification is NVIDIA 12.4.131、-- The CXX compiler identification is GNU 11.5.0 后编译 paddle/phi/core/platform/profiler.cu 失败:/usr/local/gcc-11.5/.../amxtileintrin.h(42): error: identifier "__builtin_ia32_ldtilecfg" is undefined。
请把这行及后续 CUDA wheel/cuDNN/TRT 路径一起调整到一个已通过必需 build 任务验证的组合,或者在镜像里加入能实际消除 nvcc/GCC 11.5 AMX intrinsic 错误的补丁/编译规避;修复后需要重新跑过 Linux-build / Build 和 PR-CI-Inference / Build。改动应保持这些值一致,例如:
# 需要同步更新并用 CI 验证通过
base image CUDA version
LD_LIBRARY_PATH cuda-X.Y
nvidia-*-cu12 wheel versions
install_cudnn/install_trt 版本
risemeup1111
left a comment
There was a problem hiding this comment.
已复查最新提交。当前 diff 已把 build 镜像切到 CUDA 12.8 并移除 TensorRT 安装,旧的 CUDA 12.4/GCC 11.5 编译失败点在代码层面已被新方案替代;本轮必需 build CI 仍在运行中,需等 CI 结果确认。我没有新增行级代码评论。
优先级:P3 非行级:PR 标题和描述不在 diff 中。当前代码已改为
Dockerfile.cuda12.8_cudnn9_gcc11、nvidia/cuda:12.8.1-cudnn-devel-ubuntu20.04,并移除了 TensorRT 安装,但标题和描述仍写 CUDA 12.4、TensorRT 8.6.1.6、cuDNN 9.1.1,容易误导后续审查和 CI 追踪。建议标题改为:[Environment Adaptation] Update build image to CUDA 12.8 and GCC 11 without TensorRT;描述中的“最终调整”“约束和 CI 证据”“本地验证”也请同步为 CUDA 12.8、cuDNN 9.7.1、12.8 wheel 版本和移除 TensorRT 的原因。处理要求:请更新后回复 Done;如果不同意,请说明保留旧描述的理由。
risemeup1111
left a comment
There was a problem hiding this comment.
已复查本次标题和描述更新。PR 标题、最终调整和本地验证内容已同步到 CUDA 12.8/no TensorRT 方案,上一条 P3 的内容层面看已处理;请作者在上一条 review 下回复 Done,我再按流程视为该项关闭。
当前没有新增行级代码问题;必需 CI 仍在运行中,继续等 CI 结果确认。
|
@ShigureNyako 喵子来帮分析下,怎么改个 gcc 怎么还导致 core dump 了,应该只需要关注 CE-Framework,其他的应该 rerun 就差不多了 |
|
复核当前 head
|
risemeup1111
left a comment
There was a problem hiding this comment.
已复查新提交。标题和描述内容仍与 CUDA 12.8/no TensorRT 方案一致;此前 P3 的内容层面已处理,但还缺作者在 review 下回复 Done,流程上仍待确认。
本轮新增一条非阻塞的行级建议,细节见 inline comment。当前新提交的 CI 仍在运行中,建议等新镜像相关任务完成后再最终判断。
| if grep -q "tools/dockerfile/build_scripts" tools/dockerfile/${docker_files[$name]}; then | ||
| md5_value=`(md5sum tools/dockerfile/${docker_files[$name]}; find tools/dockerfile/build_scripts -type f -print | sort | xargs md5sum) | md5sum | awk '{print $1}'` | ||
| else | ||
| md5_value=`md5sum tools/dockerfile/${docker_files[$name]} | awk '{print $1}'` | ||
| fi |
There was a problem hiding this comment.
优先级:P2
处理要求:请针对该评论进行回复(同意并已修改请回复 Done,不同意请说明理由)。
这里新增的 find tools/dockerfile/build_scripts ... 会让 is_merge == "true" 的路径在拉取缓存前失败:该分支只下载 ci_dockerfile.sh 和 Dockerfile.ubuntu20,不会带出 tools/dockerfile/build_scripts 目录;在 Actions 的 bash -e -o pipefail 语义下,缺目录会直接中断,连已有缓存镜像也无法使用。请在目录存在时再把 build_scripts 纳入 hash,或者在 is_merge 分支同步下载该目录。一个本地化修复如下:
| if grep -q "tools/dockerfile/build_scripts" tools/dockerfile/${docker_files[$name]}; then | |
| md5_value=`(md5sum tools/dockerfile/${docker_files[$name]}; find tools/dockerfile/build_scripts -type f -print | sort | xargs md5sum) | md5sum | awk '{print $1}'` | |
| else | |
| md5_value=`md5sum tools/dockerfile/${docker_files[$name]} | awk '{print $1}'` | |
| fi | |
| if grep -q "tools/dockerfile/build_scripts" tools/dockerfile/${docker_files[$name]} && [ -d tools/dockerfile/build_scripts ]; then | |
| md5_value=`(md5sum tools/dockerfile/${docker_files[$name]}; find tools/dockerfile/build_scripts -type f -print | sort | xargs md5sum) | md5sum | awk '{print $1}'` | |
| else | |
| md5_value=`md5sum tools/dockerfile/${docker_files[$name]} | awk '{print $1}'` | |
| fi |
PR Category
Environment Adaptation
PR Types
Bug fixes
Description
关联链接:PaddlePaddle/Paddle#79260
#79260 将 C++20 baseline 推到 GCC 11 后,CI build 镜像需要同步升级。当前分支已合入 develop,其中 PaddlePaddle/Paddle#79444 已将 TensorRT 从默认 CI 中退场,因此 build image 不再需要为了 V100 / P4 的 TensorRT 兼容性停在较低 CUDA 组合。
本 PR 的最终调整
upstream/develop。docker_build_file更新为Dockerfile.cuda12.8_cudnn9_gcc11,避免复用旧镜像缓存。make_ce_framework_dockerfile使用nvidia/cuda:12.8.1-cudnn-devel-ubuntu20.04。/usr/local/cuda-12.8/targets/x86_64-linux/lib。setup.py已维护的 CUDA 12.8 版本组。install_trt.sh调用,生成镜像不再安装 TensorRT。CUDNN_VERSION=9.7.1。install_gcc.sh gcc11源码构建 GCC 11.5.0,不依赖ubuntu-toolchain-r/testPPA。影响范围
本 PR 修改
.github/workflows/docker.yml的task: build镜像输入,因此直接影响docker_build_image的所有下游消费者,包括:CI-Build.yml:PR-CI-Inference、Linux-build、Static-Check、CE-Framework、CE-CINN-Framework、Api-Benchmark、Model-Benchmark、Slice、DeepMD-Kit-Test。Api-Benchmark-baseline.yml:schedule 场景的Api benchmark build以及手动/定时触发的 baseline 任务。Slice-baseline.yml:手动触发的Slice build和Slice test。Slice-torch.yml:手动/定时触发的 torch slice baseline 测试。CI-Build.yml中的Auto-Parallel目前仍是注释状态,不计入当前直接消费面。本地验证
bash -n tools/dockerfile/ci_dockerfile.shgit diff --check -- .github/workflows/docker.yml tools/dockerfile/ci_dockerfile.shDockerfile.cuda12.8_cudnn9_gcc11,确认生成文件包含 CUDA 12.8、GCC 11,且不再包含install_trt、TensorRT或_trt*文件名。prek run --files .github/workflows/docker.yml tools/dockerfile/ci_dockerfile.sh是否引起精度变化
否。该 PR 只调整 CI build 镜像的 CUDA/cuDNN/GCC 环境,不改变模型计算逻辑或算子实现。