mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +08:00
* [Cherry-Pick][CI] Sync dev optimizations to 2.4(#7335)
This commit is contained in:
@@ -85,12 +85,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"
|
||||
@@ -173,12 +188,16 @@ jobs:
|
||||
export RDMA_DEVICES=$(find /dev/infiniband/uverbs* -maxdepth 1 -not -type d | xargs -I{} echo '--device {}:{}')
|
||||
|
||||
docker run --rm --net=host \
|
||||
--sysctl kernel.msgmax=1048576 \
|
||||
--sysctl kernel.msgmnb=268435456 \
|
||||
--name ${runner_name} \
|
||||
--cap-add=SYS_PTRACE --cap-add=IPC_LOCK \
|
||||
--shm-size=64G \
|
||||
--shm-size=128G \
|
||||
${RDMA_DEVICES} \
|
||||
--device=/dev/infiniband/rdma_cm \
|
||||
--ulimit memlock=-1:-1 \
|
||||
--ulimit nofile=65536:65536 \
|
||||
--ulimit nproc=8192:8192 \
|
||||
-v $(pwd):/workspace -w /workspace \
|
||||
-v "${CACHE_DIR}/gitconfig:/etc/gitconfig:ro" \
|
||||
-v "${CACHE_DIR}/.cache:/root/.cache" \
|
||||
@@ -198,6 +217,7 @@ jobs:
|
||||
-e "fd_wheel_url=${fd_wheel_url}" \
|
||||
-e "BASE_REF=${BASE_REF}" \
|
||||
-e "IS_PR=${IS_PR}" \
|
||||
-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 -c '
|
||||
|
||||
git config --global --add safe.directory /workspace/FastDeploy
|
||||
@@ -205,7 +225,7 @@ jobs:
|
||||
git diff origin/${BASE_REF}..HEAD --unified=0 > diff.txt
|
||||
# Avoid using pip cache to ensure the wheel is updated to the latest version
|
||||
wget -q --no-proxy https://paddle-qa.bj.bcebos.com/paddle-pipeline/Release-TagBuild-Training-Linux-Gpu-Cuda12.6-Cudnn9.5-Trt10.5-Mkl-Avx-Gcc11-SelfBuiltPypiUse/latest/paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl
|
||||
python -m pip install paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl
|
||||
python -m pip install paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl --extra-index-url https://www.paddlepaddle.org.cn/packages/stable/cu126/
|
||||
pip config set global.extra-index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
|
||||
|
||||
python -m pip install -r scripts/unittest_requirement.txt
|
||||
@@ -380,6 +400,13 @@ jobs:
|
||||
echo "coverage passed"
|
||||
exit 0
|
||||
|
||||
- name: Terminate and delete the container
|
||||
if: always()
|
||||
run: |
|
||||
set +e
|
||||
docker exec -t ${{ runner.name }} /bin/bash -c 'find /workspace -mindepth 1 -delete'
|
||||
docker rm -f ${{ runner.name }}
|
||||
|
||||
diff_coverage_report:
|
||||
needs: run_tests_with_coverage
|
||||
if: always()
|
||||
|
||||
Reference in New Issue
Block a user