From 1a6cfe43d32e36650978b90956f37be2763b44f5 Mon Sep 17 00:00:00 2001 From: tianshuo78520a <707759223@qq.com> Date: Wed, 15 Oct 2025 07:48:40 +0000 Subject: [PATCH 1/3] Disable GCU CI --- .github/workflows/_ci_image_build.yml | 151 +++++++++++++++----------- .github/workflows/ci_gcu.yml | 98 ----------------- 2 files changed, 88 insertions(+), 161 deletions(-) delete mode 100644 .github/workflows/ci_gcu.yml diff --git a/.github/workflows/_ci_image_build.yml b/.github/workflows/_ci_image_build.yml index a498d63d1f3..408a6bed3c5 100644 --- a/.github/workflows/_ci_image_build.yml +++ b/.github/workflows/_ci_image_build.yml @@ -1,73 +1,98 @@ -name: Docker Build -description: "FastDeploy CI Image Build" +name: CI_GCU on: - workflow_call: - inputs: - CI_DOCKER_IMAGE_NAME: - description: "Build Images" - required: true - type: string - default: "ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleqa:cuda126-py310" - FASTDEPLOY_ARCHIVE_URL: - description: "URL of the compressed FastDeploy code archive." - required: true - type: string - DOCKER_IMAGE_NAME: - description: "Build Images" - required: false - type: string - default: "ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleqa:fastdeploy-ciuse-cuda126-dailyupdate" - outputs: - docker_name_precheck: - description: "Output path of the generated wheel" - value: ${{ jobs.docker_build.outputs.docker_name_precheck }} + pull_request: + branches: + - develop + - 'release/*' + workflow_dispatch: + +concurrency: + group: ${{ github.event.pull_request.number }}-gcu-ci + cancel-in-progress: true jobs: - docker_build: - runs-on: [self-hosted, Docker-Build] - outputs: - docker_name_precheck: ${{ steps.docker_build.outputs.docker_name_precheck }} + CI_GCU: + runs-on: + group: GCU steps: - - name: Docker Build - id: docker_build - shell: bash + - name: Print current runner name + run: | + echo "Current runner name: ${{ runner.name }}" + + - name: Code Checkout env: - docker_image_name: ${{ inputs.CI_DOCKER_IMAGE_NAME }} - docker_image: ${{ inputs.DOCKER_IMAGE_NAME }} - fd_archive_url: ${{ inputs.FASTDEPLOY_ARCHIVE_URL }} + docker_image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/device/paddle-gcu:topsrider3.5.102-ubuntu20-x86_64-gcc84 run: | - set -x - REPO="https://github.com/${{ github.repository }}.git" - FULL_REPO="${{ github.repository }}" - REPO_NAME="${FULL_REPO##*/}" - BASE_BRANCH="${{ github.base_ref }}" + REPO="https://github.com/${{ github.repository }}.git" + FULL_REPO="${{ github.repository }}" + REPO_NAME="${FULL_REPO##*/}" + BASE_BRANCH="${{ github.base_ref }}" + # Clean the repository directory before starting + docker run --rm --net=host -v $(pwd):/workspace \ + -v ${{ github.workspace }}/../../..:${{ github.workspace }}/../../.. \ + -w /workspace \ + -e "REPO_NAME=${REPO_NAME}" \ + -e "BASE_BRANCH=${BASE_BRANCH}" \ + ${docker_image} /bin/bash -c ' + if [ -d ${REPO_NAME} ]; then + echo "Directory ${REPO_NAME} exists, removing it..." + rm -rf ${REPO_NAME} + fi + ' + git config --global user.name "FastDeployCI" + git config --global user.email "fastdeploy_ci@example.com" + source ${{ github.workspace }}/../../../proxy + git clone ${REPO} ${REPO_NAME} -b ${BASE_BRANCH} + cd FastDeploy + if [ "${{ github.event_name }}" = "pull_request" ]; then + git fetch origin pull/${{ github.event.pull_request.number }}/head:pr/${{ github.event.pull_request.number }} + git merge pr/${{ github.event.pull_request.number }} + git log -n 3 --oneline + else + git checkout ${{ github.sha }} + git log -n 3 --oneline + fi + echo "Copy models..." + sudo mkdir -p ci_models && sudo cp -r /work/deps/ERNIE-4.5-21B-A3B-Paddle ci_models + echo "Copy models done." - # Clean the repository directory before starting - docker run --rm --net=host -v $(pwd):/workspace -w /workspace \ - -e "REPO_NAME=${REPO_NAME}" \ - ${docker_image} /bin/bash -c ' - if [ -d ${REPO_NAME} ]; then - echo "Directory ${REPO_NAME} exists, removing it..." - rm -rf ${REPO_NAME}* - fi - ' + - name: Run CI unittest + env: + docker_image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/device/paddle-gcu:topsrider3.5.102-ubuntu20-x86_64-gcc84 + run: | + runner_name="${{ runner.name }}" + last_char="${runner_name: -1}" - wget -q --no-proxy ${fd_archive_url} - tar -xf FastDeploy.tar.gz - rm -rf FastDeploy.tar.gz - cd FastDeploy - git config --global user.name "FastDeployCI" - git config --global user.email "fastdeploy_ci@example.com" - git log -n 3 --oneline + if [[ "$last_char" =~ [0-3] ]]; then + gcu_id="$last_char" + else + gcu_id="0" + fi + FD_API_PORT=$((9180 + gcu_id * 100)) + FD_ENGINE_QUEUE_PORT=$((9150 + gcu_id * 100)) + FD_METRICS_PORT=$((9170 + gcu_id * 100)) - # Docker Build - cd tools/dockerfile/ - set -e - cp ../../requirements.txt ./ - cp ../../scripts/unittest_requirement.txt ./ - docker build -t ${docker_image_name} -f Dockerfile.ci . \ - --network host \ - --no-cache - docker push ${docker_image_name} - echo "docker_name_precheck=${docker_image_name}" >> $GITHUB_OUTPUT + PARENT_DIR=$(dirname "$WORKSPACE") + echo "PARENT_DIR:$PARENT_DIR" + echo "Install drivers..." + cd /work/deps + sudo bash TopsRider_i3x_*_deb_amd64.run --driver --no-auto-load -y + cd - + echo "Create docker..." + docker run --rm --network=host --ipc=host --privileged \ + -v $(pwd):/workspace \ + -v /home:/home \ + -v /work:/work \ + -w /workspace \ + -e "MODEL_PATH=./ci_models" \ + -e "http_proxy=$(git config --global --get http.proxy)" \ + -e "https_proxy=$(git config --global --get https.proxy)" \ + -e "FD_API_PORT=${FD_API_PORT}" \ + -e "FD_ENGINE_QUEUE_PORT=${FD_ENGINE_QUEUE_PORT}" \ + -e "FD_METRICS_PORT=${FD_METRICS_PORT}" \ + ${docker_image} /bin/bash -c " + git config --global --add safe.directory /workspace/FastDeploy + cd FastDeploy + bash scripts/run_ci_gcu.sh + " diff --git a/.github/workflows/ci_gcu.yml b/.github/workflows/ci_gcu.yml deleted file mode 100644 index 408a6bed3c5..00000000000 --- a/.github/workflows/ci_gcu.yml +++ /dev/null @@ -1,98 +0,0 @@ -name: CI_GCU - -on: - pull_request: - branches: - - develop - - 'release/*' - workflow_dispatch: - -concurrency: - group: ${{ github.event.pull_request.number }}-gcu-ci - cancel-in-progress: true - -jobs: - CI_GCU: - runs-on: - group: GCU - steps: - - name: Print current runner name - run: | - echo "Current runner name: ${{ runner.name }}" - - - name: Code Checkout - env: - docker_image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/device/paddle-gcu:topsrider3.5.102-ubuntu20-x86_64-gcc84 - run: | - REPO="https://github.com/${{ github.repository }}.git" - FULL_REPO="${{ github.repository }}" - REPO_NAME="${FULL_REPO##*/}" - BASE_BRANCH="${{ github.base_ref }}" - # Clean the repository directory before starting - docker run --rm --net=host -v $(pwd):/workspace \ - -v ${{ github.workspace }}/../../..:${{ github.workspace }}/../../.. \ - -w /workspace \ - -e "REPO_NAME=${REPO_NAME}" \ - -e "BASE_BRANCH=${BASE_BRANCH}" \ - ${docker_image} /bin/bash -c ' - if [ -d ${REPO_NAME} ]; then - echo "Directory ${REPO_NAME} exists, removing it..." - rm -rf ${REPO_NAME} - fi - ' - git config --global user.name "FastDeployCI" - git config --global user.email "fastdeploy_ci@example.com" - source ${{ github.workspace }}/../../../proxy - git clone ${REPO} ${REPO_NAME} -b ${BASE_BRANCH} - cd FastDeploy - if [ "${{ github.event_name }}" = "pull_request" ]; then - git fetch origin pull/${{ github.event.pull_request.number }}/head:pr/${{ github.event.pull_request.number }} - git merge pr/${{ github.event.pull_request.number }} - git log -n 3 --oneline - else - git checkout ${{ github.sha }} - git log -n 3 --oneline - fi - echo "Copy models..." - sudo mkdir -p ci_models && sudo cp -r /work/deps/ERNIE-4.5-21B-A3B-Paddle ci_models - echo "Copy models done." - - - name: Run CI unittest - env: - docker_image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/device/paddle-gcu:topsrider3.5.102-ubuntu20-x86_64-gcc84 - run: | - runner_name="${{ runner.name }}" - last_char="${runner_name: -1}" - - if [[ "$last_char" =~ [0-3] ]]; then - gcu_id="$last_char" - else - gcu_id="0" - fi - FD_API_PORT=$((9180 + gcu_id * 100)) - FD_ENGINE_QUEUE_PORT=$((9150 + gcu_id * 100)) - FD_METRICS_PORT=$((9170 + gcu_id * 100)) - - PARENT_DIR=$(dirname "$WORKSPACE") - echo "PARENT_DIR:$PARENT_DIR" - echo "Install drivers..." - cd /work/deps - sudo bash TopsRider_i3x_*_deb_amd64.run --driver --no-auto-load -y - cd - - echo "Create docker..." - docker run --rm --network=host --ipc=host --privileged \ - -v $(pwd):/workspace \ - -v /home:/home \ - -v /work:/work \ - -w /workspace \ - -e "MODEL_PATH=./ci_models" \ - -e "http_proxy=$(git config --global --get http.proxy)" \ - -e "https_proxy=$(git config --global --get https.proxy)" \ - -e "FD_API_PORT=${FD_API_PORT}" \ - -e "FD_ENGINE_QUEUE_PORT=${FD_ENGINE_QUEUE_PORT}" \ - -e "FD_METRICS_PORT=${FD_METRICS_PORT}" \ - ${docker_image} /bin/bash -c " - git config --global --add safe.directory /workspace/FastDeploy - cd FastDeploy - bash scripts/run_ci_gcu.sh - " From 5e48f867099604f39aa6c053cd0f99981b056e94 Mon Sep 17 00:00:00 2001 From: tianshuo78520a <707759223@qq.com> Date: Wed, 15 Oct 2025 07:51:14 +0000 Subject: [PATCH 2/3] Disable GCU CI --- .github/workflows/_ci_gcu.yml | 98 +++++++++++++++++ .github/workflows/_ci_image_build.yml | 151 +++++++++++--------------- 2 files changed, 161 insertions(+), 88 deletions(-) create mode 100644 .github/workflows/_ci_gcu.yml diff --git a/.github/workflows/_ci_gcu.yml b/.github/workflows/_ci_gcu.yml new file mode 100644 index 00000000000..408a6bed3c5 --- /dev/null +++ b/.github/workflows/_ci_gcu.yml @@ -0,0 +1,98 @@ +name: CI_GCU + +on: + pull_request: + branches: + - develop + - 'release/*' + workflow_dispatch: + +concurrency: + group: ${{ github.event.pull_request.number }}-gcu-ci + cancel-in-progress: true + +jobs: + CI_GCU: + runs-on: + group: GCU + steps: + - name: Print current runner name + run: | + echo "Current runner name: ${{ runner.name }}" + + - name: Code Checkout + env: + docker_image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/device/paddle-gcu:topsrider3.5.102-ubuntu20-x86_64-gcc84 + run: | + REPO="https://github.com/${{ github.repository }}.git" + FULL_REPO="${{ github.repository }}" + REPO_NAME="${FULL_REPO##*/}" + BASE_BRANCH="${{ github.base_ref }}" + # Clean the repository directory before starting + docker run --rm --net=host -v $(pwd):/workspace \ + -v ${{ github.workspace }}/../../..:${{ github.workspace }}/../../.. \ + -w /workspace \ + -e "REPO_NAME=${REPO_NAME}" \ + -e "BASE_BRANCH=${BASE_BRANCH}" \ + ${docker_image} /bin/bash -c ' + if [ -d ${REPO_NAME} ]; then + echo "Directory ${REPO_NAME} exists, removing it..." + rm -rf ${REPO_NAME} + fi + ' + git config --global user.name "FastDeployCI" + git config --global user.email "fastdeploy_ci@example.com" + source ${{ github.workspace }}/../../../proxy + git clone ${REPO} ${REPO_NAME} -b ${BASE_BRANCH} + cd FastDeploy + if [ "${{ github.event_name }}" = "pull_request" ]; then + git fetch origin pull/${{ github.event.pull_request.number }}/head:pr/${{ github.event.pull_request.number }} + git merge pr/${{ github.event.pull_request.number }} + git log -n 3 --oneline + else + git checkout ${{ github.sha }} + git log -n 3 --oneline + fi + echo "Copy models..." + sudo mkdir -p ci_models && sudo cp -r /work/deps/ERNIE-4.5-21B-A3B-Paddle ci_models + echo "Copy models done." + + - name: Run CI unittest + env: + docker_image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/device/paddle-gcu:topsrider3.5.102-ubuntu20-x86_64-gcc84 + run: | + runner_name="${{ runner.name }}" + last_char="${runner_name: -1}" + + if [[ "$last_char" =~ [0-3] ]]; then + gcu_id="$last_char" + else + gcu_id="0" + fi + FD_API_PORT=$((9180 + gcu_id * 100)) + FD_ENGINE_QUEUE_PORT=$((9150 + gcu_id * 100)) + FD_METRICS_PORT=$((9170 + gcu_id * 100)) + + PARENT_DIR=$(dirname "$WORKSPACE") + echo "PARENT_DIR:$PARENT_DIR" + echo "Install drivers..." + cd /work/deps + sudo bash TopsRider_i3x_*_deb_amd64.run --driver --no-auto-load -y + cd - + echo "Create docker..." + docker run --rm --network=host --ipc=host --privileged \ + -v $(pwd):/workspace \ + -v /home:/home \ + -v /work:/work \ + -w /workspace \ + -e "MODEL_PATH=./ci_models" \ + -e "http_proxy=$(git config --global --get http.proxy)" \ + -e "https_proxy=$(git config --global --get https.proxy)" \ + -e "FD_API_PORT=${FD_API_PORT}" \ + -e "FD_ENGINE_QUEUE_PORT=${FD_ENGINE_QUEUE_PORT}" \ + -e "FD_METRICS_PORT=${FD_METRICS_PORT}" \ + ${docker_image} /bin/bash -c " + git config --global --add safe.directory /workspace/FastDeploy + cd FastDeploy + bash scripts/run_ci_gcu.sh + " diff --git a/.github/workflows/_ci_image_build.yml b/.github/workflows/_ci_image_build.yml index 408a6bed3c5..a498d63d1f3 100644 --- a/.github/workflows/_ci_image_build.yml +++ b/.github/workflows/_ci_image_build.yml @@ -1,98 +1,73 @@ -name: CI_GCU +name: Docker Build +description: "FastDeploy CI Image Build" on: - pull_request: - branches: - - develop - - 'release/*' - workflow_dispatch: - -concurrency: - group: ${{ github.event.pull_request.number }}-gcu-ci - cancel-in-progress: true + workflow_call: + inputs: + CI_DOCKER_IMAGE_NAME: + description: "Build Images" + required: true + type: string + default: "ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleqa:cuda126-py310" + FASTDEPLOY_ARCHIVE_URL: + description: "URL of the compressed FastDeploy code archive." + required: true + type: string + DOCKER_IMAGE_NAME: + description: "Build Images" + required: false + type: string + default: "ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleqa:fastdeploy-ciuse-cuda126-dailyupdate" + outputs: + docker_name_precheck: + description: "Output path of the generated wheel" + value: ${{ jobs.docker_build.outputs.docker_name_precheck }} jobs: - CI_GCU: - runs-on: - group: GCU + docker_build: + runs-on: [self-hosted, Docker-Build] + outputs: + docker_name_precheck: ${{ steps.docker_build.outputs.docker_name_precheck }} steps: - - name: Print current runner name - run: | - echo "Current runner name: ${{ runner.name }}" - - - name: Code Checkout + - name: Docker Build + id: docker_build + shell: bash env: - docker_image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/device/paddle-gcu:topsrider3.5.102-ubuntu20-x86_64-gcc84 + docker_image_name: ${{ inputs.CI_DOCKER_IMAGE_NAME }} + docker_image: ${{ inputs.DOCKER_IMAGE_NAME }} + fd_archive_url: ${{ inputs.FASTDEPLOY_ARCHIVE_URL }} run: | - REPO="https://github.com/${{ github.repository }}.git" - FULL_REPO="${{ github.repository }}" - REPO_NAME="${FULL_REPO##*/}" - BASE_BRANCH="${{ github.base_ref }}" - # Clean the repository directory before starting - docker run --rm --net=host -v $(pwd):/workspace \ - -v ${{ github.workspace }}/../../..:${{ github.workspace }}/../../.. \ - -w /workspace \ - -e "REPO_NAME=${REPO_NAME}" \ - -e "BASE_BRANCH=${BASE_BRANCH}" \ - ${docker_image} /bin/bash -c ' - if [ -d ${REPO_NAME} ]; then - echo "Directory ${REPO_NAME} exists, removing it..." - rm -rf ${REPO_NAME} - fi - ' - git config --global user.name "FastDeployCI" - git config --global user.email "fastdeploy_ci@example.com" - source ${{ github.workspace }}/../../../proxy - git clone ${REPO} ${REPO_NAME} -b ${BASE_BRANCH} - cd FastDeploy - if [ "${{ github.event_name }}" = "pull_request" ]; then - git fetch origin pull/${{ github.event.pull_request.number }}/head:pr/${{ github.event.pull_request.number }} - git merge pr/${{ github.event.pull_request.number }} - git log -n 3 --oneline - else - git checkout ${{ github.sha }} - git log -n 3 --oneline - fi - echo "Copy models..." - sudo mkdir -p ci_models && sudo cp -r /work/deps/ERNIE-4.5-21B-A3B-Paddle ci_models - echo "Copy models done." + set -x + REPO="https://github.com/${{ github.repository }}.git" + FULL_REPO="${{ github.repository }}" + REPO_NAME="${FULL_REPO##*/}" + BASE_BRANCH="${{ github.base_ref }}" - - name: Run CI unittest - env: - docker_image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/device/paddle-gcu:topsrider3.5.102-ubuntu20-x86_64-gcc84 - run: | - runner_name="${{ runner.name }}" - last_char="${runner_name: -1}" + # Clean the repository directory before starting + docker run --rm --net=host -v $(pwd):/workspace -w /workspace \ + -e "REPO_NAME=${REPO_NAME}" \ + ${docker_image} /bin/bash -c ' + if [ -d ${REPO_NAME} ]; then + echo "Directory ${REPO_NAME} exists, removing it..." + rm -rf ${REPO_NAME}* + fi + ' - if [[ "$last_char" =~ [0-3] ]]; then - gcu_id="$last_char" - else - gcu_id="0" - fi - FD_API_PORT=$((9180 + gcu_id * 100)) - FD_ENGINE_QUEUE_PORT=$((9150 + gcu_id * 100)) - FD_METRICS_PORT=$((9170 + gcu_id * 100)) + wget -q --no-proxy ${fd_archive_url} + tar -xf FastDeploy.tar.gz + rm -rf FastDeploy.tar.gz + cd FastDeploy + git config --global user.name "FastDeployCI" + git config --global user.email "fastdeploy_ci@example.com" + git log -n 3 --oneline - PARENT_DIR=$(dirname "$WORKSPACE") - echo "PARENT_DIR:$PARENT_DIR" - echo "Install drivers..." - cd /work/deps - sudo bash TopsRider_i3x_*_deb_amd64.run --driver --no-auto-load -y - cd - - echo "Create docker..." - docker run --rm --network=host --ipc=host --privileged \ - -v $(pwd):/workspace \ - -v /home:/home \ - -v /work:/work \ - -w /workspace \ - -e "MODEL_PATH=./ci_models" \ - -e "http_proxy=$(git config --global --get http.proxy)" \ - -e "https_proxy=$(git config --global --get https.proxy)" \ - -e "FD_API_PORT=${FD_API_PORT}" \ - -e "FD_ENGINE_QUEUE_PORT=${FD_ENGINE_QUEUE_PORT}" \ - -e "FD_METRICS_PORT=${FD_METRICS_PORT}" \ - ${docker_image} /bin/bash -c " - git config --global --add safe.directory /workspace/FastDeploy - cd FastDeploy - bash scripts/run_ci_gcu.sh - " + # Docker Build + cd tools/dockerfile/ + set -e + cp ../../requirements.txt ./ + cp ../../scripts/unittest_requirement.txt ./ + docker build -t ${docker_image_name} -f Dockerfile.ci . \ + --network host \ + --no-cache + docker push ${docker_image_name} + echo "docker_name_precheck=${docker_image_name}" >> $GITHUB_OUTPUT From 9ec8bdce9c1376f3ff7ae8250d5e41301afdcd8f Mon Sep 17 00:00:00 2001 From: tianshuo78520a Date: Wed, 15 Oct 2025 16:01:19 +0800 Subject: [PATCH 3/3] Update _ci_gcu.yml --- .github/workflows/_ci_gcu.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/_ci_gcu.yml b/.github/workflows/_ci_gcu.yml index 408a6bed3c5..968fc5a68c4 100644 --- a/.github/workflows/_ci_gcu.yml +++ b/.github/workflows/_ci_gcu.yml @@ -1,10 +1,10 @@ name: CI_GCU on: - pull_request: - branches: - - develop - - 'release/*' + #pull_request: + #branches: + #- develop + #- 'release/*' workflow_dispatch: concurrency: