Support GLM4.5 in PaddleFleet (#2991) #218
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Whl CE | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| env: | |
| COMMIT_ID: ${{ github.sha }} | |
| TASK: PaddleFormers-CE-${{ github.sha }}-build | |
| CE_name: build-ce | |
| no_proxy: "localhost,bj.bcebos.com,su.bcebos.com,bcebos.com,apiin.im.baidu.com,gitee.com,aliyun.com,.baidu.com,.tuna.tsinghua.edu.cn" | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build-ce: | |
| name: build-ce | |
| runs-on: [self-hosted, paddleformers] | |
| steps: | |
| - name: Determine Image Name | |
| run: | | |
| echo "IMAGE_NAME=ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddle:cuda126-dev-latest" >> "$GITHUB_ENV" | |
| - name: Run Container | |
| env: | |
| work_dir: ${{ github.workspace }} | |
| FLAGS_dynamic_static_unified_comm: "True" | |
| python_version: "3.10" | |
| paddle: https://paddle-qa.bj.bcebos.com/paddle-pipeline/Develop-GpuAll-LinuxCentos-Gcc11-Cuda126-Cudnn95-Trt105-Py310-Compile/latest/paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl | |
| run: | | |
| container_name=${TASK}-$(date +%Y%m%d-%H%M%S) | |
| echo "container_name=${container_name}" >> "$GITHUB_ENV" | |
| docker run -d -t --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 \ | |
| -e BRANCH \ | |
| -e COMMIT_ID \ | |
| -e work_dir \ | |
| -e ce_scripts \ | |
| -e no_proxy \ | |
| -e CE_name \ | |
| -e paddle \ | |
| -e FLAGS_dynamic_static_unified_comm \ | |
| -e python_version \ | |
| -w /workspace --runtime=nvidia --privileged $IMAGE_NAME | |
| - name: Download Code | |
| run: | | |
| docker exec -t $container_name /bin/bash -c ' | |
| rm -rf * .[^.]* | |
| echo "Downloading PaddleFormers.tar" | |
| wget -q --no-proxy https://paddle-qa.bj.bcebos.com/CodeSync/develop/PaddleFormers.tar --no-check-certificate | |
| echo "Extracting PaddleFormers.tar" | |
| tar xf PaddleFormers.tar && rm -rf PaddleFormers.tar | |
| source $work_dir/../../../proxy | |
| cd PaddleFormers | |
| git config --global user.name "PaddleCE" | |
| git config --global user.email "[email protected]" | |
| git pull | |
| git submodule update --init --recursive --force | |
| git checkout -b $COMMIT_ID $COMMIT_ID | |
| git log --pretty=oneline -10 | |
| ' | |
| - name: Test | |
| run: | | |
| docker exec -t $container_name /bin/bash -c ' | |
| ldconfig | |
| pip config set global.cache-dir "/home/.cache/pip" | |
| set -e | |
| cd /workspace/PaddleFormers && git config --global --add safe.directory $PWD | |
| bash scripts/dependence/build.sh | |
| ' | |
| - name: Upload Products | |
| if: always() | |
| env: | |
| home_path: ${{ github.workspace }}/../../.. | |
| bos_file: ${{ github.workspace }}/../../../bos/BosClient.py | |
| run: | | |
| docker exec -t $container_name /bin/bash -c ' | |
| if [ ! -f "${{ env.bos_file }}" ]; then | |
| wget -q --no-proxy -O ${{ env.home_path }}/bos_new.tar.gz https://xly-devops.bj.bcebos.com/home/bos_new.tar.gz --no-check-certificate | |
| mkdir ${{ env.home_path }}/bos | |
| tar xf ${{ env.home_path }}/bos_new.tar.gz -C ${{ env.home_path }}/bos | |
| fi | |
| cd /workspace/PaddleFormers/upload | |
| for FILE in /workspace/PaddleFormers/upload/*; do | |
| file=$(basename "$FILE") | |
| python ${{ env.bos_file }} $file paddleformers/wheels | |
| echo "$file: https://paddleformers.bj.bcebos.com/wheels/$file" | |
| done | |
| ' | |
| - name: Terminate And Delete the Container | |
| if: always() | |
| run: | | |
| docker rm -f $container_name 2>/dev/null || true |