mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 08:21:53 +08:00
* [Cherry-Pick][CI] Sync dev optimizations to 2.4(#7335)
This commit is contained in:
@@ -81,12 +81,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"
|
||||
@@ -166,7 +181,10 @@ jobs:
|
||||
docker rm -f ${runner_name} || true
|
||||
fi
|
||||
|
||||
docker run --rm --ipc=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 \
|
||||
-v "${CACHE_DIR}/gitconfig:/etc/gitconfig:ro" \
|
||||
@@ -183,6 +201,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
|
||||
@@ -191,8 +210,7 @@ jobs:
|
||||
|
||||
# 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
|
||||
@@ -204,3 +222,10 @@ jobs:
|
||||
export CUDA_VISIBLE_DEVICES=0,1,2,3
|
||||
bash scripts/run_gpu_4cards.sh
|
||||
'
|
||||
|
||||
- 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 }}
|
||||
|
||||
Reference in New Issue
Block a user