Skip to content

Commit a25fd8d

Browse files
authored
Update CI (#3114)
1 parent 4558548 commit a25fd8d

File tree

4 files changed

+19
-23
lines changed

4 files changed

+19
-23
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
work_dir: ${{ github.workspace }}
5252
FLAGS_dynamic_static_unified_comm: "True"
5353
python_version: "3.10"
54-
PIP_CACHE_DIR: /home/.cache/pip
54+
PIP_CACHE_DIR: /root/.cache/pip
5555
paddle_whl: https://paddle-qa.bj.bcebos.com/paddle-pipeline/Develop-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
5656
run: |
5757
container_name=${TASK}-$(date +%Y%m%d-%H%M%S)
@@ -61,7 +61,7 @@ jobs:
6161
docker run -d -t --gpus all --runtime=nvidia --name ${container_name} --net=host -v /dev/shm:/dev/shm --shm-size=32G \
6262
-v ${work_dir}/../../..:${work_dir}/../../.. \
6363
-v ${work_dir}:/workspace \
64-
-v /home/.cache/pip:/home/.cache/pip \
64+
-v /home/.cache/:/root/.cache/ \
6565
-v /home/paddle-1/models/:/home/models/ \
6666
-e "BRANCH=$BRANCH" \
6767
-e "AGILE_COMPILE_BRANCH=$AGILE_COMPILE_BRANCH" \
@@ -91,6 +91,7 @@ jobs:
9191
tar xf PaddleFormers.tar && rm -rf PaddleFormers.tar
9292
echo "work_dir = ${work_dir}"
9393
source ${work_dir}/../../../proxy
94+
pip install uv
9495
cd PaddleFormers
9596
git config --global user.name "PaddleCI"
9697
git config --global user.email "[email protected]"
@@ -114,8 +115,9 @@ jobs:
114115
run: |
115116
docker exec -t $container_name /bin/bash -c '
116117
ldconfig
117-
mkdir -p /home/.cache/pip
118+
mkdir -p /root/.cache/pip
118119
pip cache dir
120+
uv cache dir
119121
set -e
120122
rm -rf /root/.cache/aistudio/
121123
cd /workspace/PaddleFormers && git config --global --add safe.directory $PWD

.github/workflows/unittest-gpu.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
work_dir: ${{ github.workspace }}
5656
FLAGS_dynamic_static_unified_comm: "True"
5757
python_version: "3.10"
58-
PIP_CACHE_DIR: /home/.cache/pip
58+
PIP_CACHE_DIR: /root/.cache/pip
5959
paddle_whl: https://paddle-qa.bj.bcebos.com/paddle-pipeline/Develop-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
6060
run: |
6161
container_name=${TASK}-$(date +%Y%m%d-%H%M%S)
@@ -65,7 +65,7 @@ jobs:
6565
docker run -d -t --gpus all --runtime=nvidia --name ${container_name} --net=host -v /dev/shm:/dev/shm --shm-size=32G \
6666
-v $work_dir/../../..:$work_dir/../../.. \
6767
-v $work_dir:/github/workspace \
68-
-v /home/.cache/pip:/home/.cache/pip \
68+
-v /home/.cache/:/root/.cache/ \
6969
-v /home/paddle-1/models/:/home/models/ \
7070
-e PF_HOME=/home/models/ \
7171
-e "BRANCH=$BRANCH" \
@@ -119,13 +119,15 @@ jobs:
119119
run: |
120120
docker exec -t $container_name /bin/bash -c '
121121
ldconfig
122-
mkdir -p /home/.cache/pip
122+
mkdir -p /root/.cache/pip
123123
pip cache dir
124+
uv cache dir
124125
set -e
125126
rm -rf /root/.cache/aistudio/
126127
cd /github/workspace/PaddleFormers && git config --global --add safe.directory $PWD
127128
source $work_dir/../../../proxy
128129
source $work_dir/../../../AISTUDIO_ACCESS_TOKEN
130+
pip install uv
129131
echo "work_dir = ${work_dir}"
130132
cp -r ${work_dir}/../../../models ./models
131133
echo "Check whether the local model file exists:"

scripts/regression/ci_model_unittest.sh

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,13 @@ AGILE_COMPILE_BRANCH=$3
2727
install_requirements() {
2828
python -m pip config --user set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
2929
python -m pip config --user set global.trusted-host pypi.tuna.tsinghua.edu.cn
30-
python -m pip uninstall paddlepaddle paddlepaddle_gpu -y
31-
sed -i '/^paddlefleet/d' requirements.txt
32-
python -m pip install -r requirements.txt
30+
python -m pip uninstall paddlepaddle paddlepaddle_gpu paddlefleet -y
3331
python -m pip install -r requirements-dev.txt
34-
python -m pip install -r tests/requirements.txt
35-
python -m pip install --pre paddlepaddle-gpu --no-cache-dir --no-dependencies --progress-bar off -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
36-
python -m pip install paddlefleet --no-dependencies --extra-index-url https://www.paddlepaddle.org.cn/packages/nightly/cu126/
37-
# python -m pip install --no-cache-dir ${paddle} --no-dependencies --progress-bar off --force-reinstall
38-
python -c "import paddle;print('paddle');print(paddle.__version__);print(paddle.version.show())" >> ${log_path}/commit_info.txt
32+
# python -m pip install --no-cache-dir ${paddle} --no-dependencies --progress-bar off
3933
python setup.py bdist_wheel > /dev/null
40-
python -m pip install dist/p****.whl
34+
uv pip install dist/p****.whl --system --prerelease=allow -i https://pypi.tuna.tsinghua.edu.cn/simple --extra-index-url https://www.paddlepaddle.org.cn/packages/nightly/cu126/ --index-strategy unsafe-best-match
35+
python -c "import paddle;print('paddle');print(paddle.__version__);print(paddle.version.show())" >> ${log_path}/commit_info.txt
36+
uv pip install -r tests/requirements.txt --system -i https://pypi.tuna.tsinghua.edu.cn/simple --index-strategy unsafe-best-match
4137
python -c "from paddleformers import __version__; print('paddleformers version:', __version__)" >> ${log_path}/commit_info.txt
4238
python -c "import paddleformers; print('paddleformers commit:',paddleformers.version.commit)" >> ${log_path}/commit_info.txt
4339
python -m pip list >> ${log_path}/commit_info.txt

scripts/unit_test/ci_unittest.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,13 @@ AGILE_COMPILE_BRANCH=$4
3737
install_requirements() {
3838
python -m pip config --user set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
3939
python -m pip config --user set global.trusted-host pypi.tuna.tsinghua.edu.cn
40-
python -m pip uninstall paddlepaddle paddlepaddle_gpu -y
41-
sed -i '/^paddlefleet/d' requirements.txt
42-
python -m pip install -r requirements.txt
40+
python -m pip uninstall paddlepaddle paddlepaddle_gpu paddlefleet -y
4341
python -m pip install -r requirements-dev.txt
44-
python -m pip install -r tests/requirements.txt
45-
python -m pip install --pre paddlepaddle-gpu --no-cache-dir --no-dependencies --progress-bar off -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
46-
python -m pip install paddlefleet --no-dependencies --extra-index-url https://www.paddlepaddle.org.cn/packages/nightly/cu126/
4742
# python -m pip install --no-cache-dir ${paddle} --no-dependencies --progress-bar off
48-
python -c "import paddle;print('paddle');print(paddle.__version__);print(paddle.version.show())" >> ${log_path}/commit_info.txt
4943
python setup.py bdist_wheel > /dev/null
50-
python -m pip install dist/p****.whl
44+
uv pip install dist/p****.whl --system --prerelease=allow -i https://pypi.tuna.tsinghua.edu.cn/simple --extra-index-url https://www.paddlepaddle.org.cn/packages/nightly/cu126/ --index-strategy unsafe-best-match
45+
python -c "import paddle;print('paddle');print(paddle.__version__);print(paddle.version.show())" >> ${log_path}/commit_info.txt
46+
uv pip install -r tests/requirements.txt --system -i https://pypi.tuna.tsinghua.edu.cn/simple --index-strategy unsafe-best-match
5147
python -c "from paddleformers import __version__; print('paddleformers version:', __version__)" >> ${log_path}/commit_info.txt
5248
python -c "import paddleformers; print('paddleformers commit:',paddleformers.version.commit)" >> ${log_path}/commit_info.txt
5349
python -m pip list >> ${log_path}/commit_info.txt

0 commit comments

Comments
 (0)