-
Notifications
You must be signed in to change notification settings - Fork 736
[Cherry-Pick][CI] Sync dev optimizations to 2.6(#7335) #7343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
EmmonsCurse
merged 1 commit into
PaddlePaddle:release/2.6
from
EmmonsCurse:ci_optimize_26_0411
Apr 12, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,12 +69,27 @@ jobs: | |
| if ls "${REPO_NAME}"* >/dev/null 2>&1; then | ||
| echo "ERROR: Failed to clean ${REPO_NAME}* after multiple attempts" | ||
| ls -ld "${REPO_NAME}"* | ||
| exit 1 | ||
| echo "Attempting force cleanup with find..." | ||
| find /workspace -mindepth 1 -maxdepth 1 -name "${REPO_NAME}*" -type d -exec chmod -R u+rwx {} \; -exec rm -rf {} + 2>/dev/null || true | ||
| if ls "${REPO_NAME}"* >/dev/null 2>&1; then | ||
| echo "ERROR: Force cleanup still failed" | ||
| exit 1 | ||
| else | ||
| echo "Force cleanup succeeded" | ||
| fi | ||
| fi | ||
| ' | ||
|
|
||
| wget -q --no-proxy ${fd_archive_url} | ||
| tar -xf FastDeploy.tar.gz | ||
| wget -q --no-proxy ${fd_archive_url} || { | ||
| echo "ERROR: Failed to download archive from ${fd_archive_url}" | ||
| exit 1 | ||
| } | ||
|
|
||
| tar --no-same-owner -xf FastDeploy.tar.gz || { | ||
| echo "ERROR: Failed to extract archive" | ||
| exit 1 | ||
| } | ||
|
|
||
| rm -rf FastDeploy.tar.gz | ||
| cd FastDeploy | ||
| git config --global user.name "FastDeployCI" | ||
|
|
@@ -145,7 +160,10 @@ jobs: | |
| docker rm -f ${runner_name} || true | ||
| fi | ||
|
|
||
| docker run --rm --ipc=host --pid=host --net=host \ | ||
| docker run --rm --net=host \ | ||
| --shm-size=64g \ | ||
| --sysctl kernel.msgmax=1048576 \ | ||
| --sysctl kernel.msgmnb=268435456 \ | ||
| --name ${runner_name} \ | ||
| -v $(pwd):/workspace \ | ||
| -w /workspace \ | ||
|
|
@@ -160,6 +178,7 @@ jobs: | |
| -v "${CACHE_DIR}/.cache:/root/.cache" \ | ||
| -v "${CACHE_DIR}/ConfigDir:/root/.config" \ | ||
| -e TZ="Asia/Shanghai" \ | ||
| -e "no_proxy=localhost,127.0.0.1,0.0.0.0,bcebos.com,.bcebos.com,bj.bcebos.com,su.bcebos.com,paddle-ci.gz.bcebos.com,apiin.im.baidu.com,baidu-int.com,.baidu.com,aliyun.com,gitee.com,pypi.tuna.tsinghua.edu.cn,.tuna.tsinghua.edu.cn" \ | ||
| --gpus '"device='"${DEVICES}"'"' ${docker_image} /bin/bash -xc ' | ||
| python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/ | ||
|
|
||
|
|
@@ -204,3 +223,10 @@ jobs: | |
| fi | ||
| echo "TEST_EXIT_CODE=${TEST_EXIT_CODE}" | ||
| exit ${TEST_EXIT_CODE} | ||
|
|
||
| - name: Terminate and delete the container | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Bug 容器清理逻辑存在漏洞 当容器已停止时(例如测试失败导致容器退出), 建议修改为: - name: Terminate and delete the container
if: always()
run: |
set +e
# 清理 workspace(如果容器仍在运行)
docker exec -t ${{ runner.name }} /bin/bash -c 'find /workspace -mindepth 1 -delete' 2>/dev/null || true
# 强制删除容器
docker rm -f ${{ runner.name }}
# 如果容器已停止但 workspace 残留,直接清理宿主机上的 workspace
find $(pwd) -mindepth 1 -maxdepth 1 -delete 2>/dev/null || true |
||
| if: always() | ||
| run: | | ||
| set +e | ||
| docker exec -t ${{ runner.name }} /bin/bash -c 'find /workspace -mindepth 1 -delete' | ||
| docker rm -f ${{ runner.name }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ 大小写不一致
此处的
--shm-size=64g使用了小写g,而其他 workflow 文件(如_unit_test_coverage.yml)使用大写G。虽然 Docker 对大小写不敏感,但建议保持一致。