mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +08:00
[CI] Ensure container cleanup after job to avoid resource leakage (#7315)
* [CI] Ensure container cleanup after job to avoid resource leakage * [CI] Use prebuilt wheels to install xgrammar==0.1.19 and torch==2.6.0
This commit is contained in:
@@ -160,7 +160,8 @@ 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 \
|
||||
--name ${runner_name} \
|
||||
-v $(pwd):/workspace \
|
||||
-w /workspace \
|
||||
@@ -220,3 +221,10 @@ jobs:
|
||||
fi
|
||||
echo "TEST_EXIT_CODE=${TEST_EXIT_CODE}"
|
||||
exit ${TEST_EXIT_CODE}
|
||||
|
||||
- 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