diff --git a/.github/workflows/model-unittest-gpu.yml b/.github/workflows/model-unittest-gpu.yml index 5a1a187d415..95bac649446 100644 --- a/.github/workflows/model-unittest-gpu.yml +++ b/.github/workflows/model-unittest-gpu.yml @@ -51,7 +51,7 @@ jobs: work_dir: ${{ github.workspace }} FLAGS_dynamic_static_unified_comm: "True" python_version: "3.10" - PIP_CACHE_DIR: /home/.cache/pip + PIP_CACHE_DIR: /root/.cache/pip 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 run: | container_name=${TASK}-$(date +%Y%m%d-%H%M%S) @@ -61,7 +61,7 @@ jobs: docker run -d -t --gpus all --runtime=nvidia --name ${container_name} --net=host -v /dev/shm:/dev/shm --shm-size=32G \ -v ${work_dir}/../../..:${work_dir}/../../.. \ -v ${work_dir}:/workspace \ - -v /home/.cache/pip:/home/.cache/pip \ + -v /home/.cache/:/root/.cache/ \ -v /home/paddle-1/models/:/home/models/ \ -e "BRANCH=$BRANCH" \ -e "AGILE_COMPILE_BRANCH=$AGILE_COMPILE_BRANCH" \ @@ -91,6 +91,7 @@ jobs: tar xf PaddleFormers.tar && rm -rf PaddleFormers.tar echo "work_dir = ${work_dir}" source ${work_dir}/../../../proxy + pip install uv cd PaddleFormers git config --global user.name "PaddleCI" git config --global user.email "paddle_ci@example.com" @@ -114,8 +115,9 @@ jobs: run: | docker exec -t $container_name /bin/bash -c ' ldconfig - mkdir -p /home/.cache/pip + mkdir -p /root/.cache/pip pip cache dir + uv cache dir set -e rm -rf /root/.cache/aistudio/ cd /workspace/PaddleFormers && git config --global --add safe.directory $PWD diff --git a/.github/workflows/unittest-gpu.yml b/.github/workflows/unittest-gpu.yml index 31d8ced87f5..c3f57cdd859 100644 --- a/.github/workflows/unittest-gpu.yml +++ b/.github/workflows/unittest-gpu.yml @@ -55,7 +55,7 @@ jobs: work_dir: ${{ github.workspace }} FLAGS_dynamic_static_unified_comm: "True" python_version: "3.10" - PIP_CACHE_DIR: /home/.cache/pip + PIP_CACHE_DIR: /root/.cache/pip 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 run: | container_name=${TASK}-$(date +%Y%m%d-%H%M%S) @@ -65,7 +65,7 @@ jobs: docker run -d -t --gpus all --runtime=nvidia --name ${container_name} --net=host -v /dev/shm:/dev/shm --shm-size=32G \ -v $work_dir/../../..:$work_dir/../../.. \ -v $work_dir:/github/workspace \ - -v /home/.cache/pip:/home/.cache/pip \ + -v /home/.cache/:/root/.cache/ \ -v /home/paddle-1/models/:/home/models/ \ -e PF_HOME=/home/models/ \ -e "BRANCH=$BRANCH" \ @@ -119,13 +119,15 @@ jobs: run: | docker exec -t $container_name /bin/bash -c ' ldconfig - mkdir -p /home/.cache/pip + mkdir -p /root/.cache/pip pip cache dir + uv cache dir set -e rm -rf /root/.cache/aistudio/ cd /github/workspace/PaddleFormers && git config --global --add safe.directory $PWD source $work_dir/../../../proxy source $work_dir/../../../AISTUDIO_ACCESS_TOKEN + pip install uv echo "work_dir = ${work_dir}" cp -r ${work_dir}/../../../models ./models echo "Check whether the local model file exists:" diff --git a/scripts/regression/ci_model_unittest.sh b/scripts/regression/ci_model_unittest.sh index 3a012bdf020..ff17d0bfc86 100644 --- a/scripts/regression/ci_model_unittest.sh +++ b/scripts/regression/ci_model_unittest.sh @@ -27,17 +27,13 @@ AGILE_COMPILE_BRANCH=$3 install_requirements() { python -m pip config --user set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple python -m pip config --user set global.trusted-host pypi.tuna.tsinghua.edu.cn - python -m pip uninstall paddlepaddle paddlepaddle_gpu -y - sed -i '/^paddlefleet/d' requirements.txt - python -m pip install -r requirements.txt + python -m pip uninstall paddlepaddle paddlepaddle_gpu paddlefleet -y python -m pip install -r requirements-dev.txt - python -m pip install -r tests/requirements.txt - python -m pip install --pre paddlepaddle-gpu --no-cache-dir --no-dependencies --progress-bar off -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/ - python -m pip install paddlefleet --no-dependencies --extra-index-url https://www.paddlepaddle.org.cn/packages/nightly/cu126/ - # python -m pip install --no-cache-dir ${paddle} --no-dependencies --progress-bar off --force-reinstall - python -c "import paddle;print('paddle');print(paddle.__version__);print(paddle.version.show())" >> ${log_path}/commit_info.txt + # python -m pip install --no-cache-dir ${paddle} --no-dependencies --progress-bar off python setup.py bdist_wheel > /dev/null - python -m pip install dist/p****.whl + 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 + python -c "import paddle;print('paddle');print(paddle.__version__);print(paddle.version.show())" >> ${log_path}/commit_info.txt + uv pip install -r tests/requirements.txt --system -i https://pypi.tuna.tsinghua.edu.cn/simple --index-strategy unsafe-best-match python -c "from paddleformers import __version__; print('paddleformers version:', __version__)" >> ${log_path}/commit_info.txt python -c "import paddleformers; print('paddleformers commit:',paddleformers.version.commit)" >> ${log_path}/commit_info.txt python -m pip list >> ${log_path}/commit_info.txt diff --git a/scripts/unit_test/ci_unittest.sh b/scripts/unit_test/ci_unittest.sh index 645a41a57e1..4d959c92564 100644 --- a/scripts/unit_test/ci_unittest.sh +++ b/scripts/unit_test/ci_unittest.sh @@ -37,17 +37,13 @@ AGILE_COMPILE_BRANCH=$4 install_requirements() { python -m pip config --user set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple python -m pip config --user set global.trusted-host pypi.tuna.tsinghua.edu.cn - python -m pip uninstall paddlepaddle paddlepaddle_gpu -y - sed -i '/^paddlefleet/d' requirements.txt - python -m pip install -r requirements.txt + python -m pip uninstall paddlepaddle paddlepaddle_gpu paddlefleet -y python -m pip install -r requirements-dev.txt - python -m pip install -r tests/requirements.txt - python -m pip install --pre paddlepaddle-gpu --no-cache-dir --no-dependencies --progress-bar off -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/ - python -m pip install paddlefleet --no-dependencies --extra-index-url https://www.paddlepaddle.org.cn/packages/nightly/cu126/ # python -m pip install --no-cache-dir ${paddle} --no-dependencies --progress-bar off - python -c "import paddle;print('paddle');print(paddle.__version__);print(paddle.version.show())" >> ${log_path}/commit_info.txt python setup.py bdist_wheel > /dev/null - python -m pip install dist/p****.whl + 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 + python -c "import paddle;print('paddle');print(paddle.__version__);print(paddle.version.show())" >> ${log_path}/commit_info.txt + uv pip install -r tests/requirements.txt --system -i https://pypi.tuna.tsinghua.edu.cn/simple --index-strategy unsafe-best-match python -c "from paddleformers import __version__; print('paddleformers version:', __version__)" >> ${log_path}/commit_info.txt python -c "import paddleformers; print('paddleformers commit:',paddleformers.version.commit)" >> ${log_path}/commit_info.txt python -m pip list >> ${log_path}/commit_info.txt