Skip to content

Commit 2c335c0

Browse files
committed
Fix model unittest CI
1 parent 6c200e9 commit 2c335c0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/model-unittest-gpu.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
run: |
5656
container_name=${TASK}-$(date +%Y%m%d-%H%M%S)
5757
echo "container_name=${container_name}" >> "$GITHUB_ENV"
58-
docker run -d -t --gpus all --name ${container_name} --net=host -v /dev/shm:/dev/shm --shm-size=32G \
58+
docker run -d -t --gpus all -it --name ${container_name} --net=host -v /dev/shm:/dev/shm --shm-size=32G \
5959
-v $work_dir/../../..:$work_dir/../../.. \
6060
-v $work_dir:/workspace \
6161
-v /home/.cache/pip:/home/.cache/pip \
@@ -117,6 +117,7 @@ jobs:
117117
echo "Check models:"
118118
ls -l ./models
119119
echo "Test Start"
120+
hostname
120121
timeout 30m bash scripts/regression/ci_model_unittest.sh ${paddle_whl}
121122
'
122123

scripts/regression/ci_model_unittest.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ if [[ ${FLAGS_enable_CI} == "true" ]] || [[ ${FLAGS_enable_CE} == "true" ]];then
109109
echo "Check docker Cuda Version"
110110
nvcc -V
111111
cat /usr/local/cuda/version.txt
112+
echo "Check nvidia-smi"
113+
nvidia-smi
114+
python -c "import paddle; print(paddle.device.get_device_count())"
112115
PYTHONPATH=$(pwd) \
113116
COVERAGE_SOURCE=paddleformers \
114117
python -m pytest -s -v ${model_unittest_path} > ${log_path}/model_unittest.log 2>&1

0 commit comments

Comments
 (0)