Fix vllm version update workflow (#1919)
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
This commit is contained in:
5
.github/env/_build_image.sh
vendored
Normal file
5
.github/env/_build_image.sh
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# Copyright (C) 2025 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export VLLM_VER=v0.8.3
|
||||
export VLLM_FORK_VER=v0.6.6.post1+Gaudi-1.20.0
|
||||
11
.github/workflows/_build_image.yml
vendored
11
.github/workflows/_build_image.yml
vendored
@@ -75,17 +75,12 @@ jobs:
|
||||
run: |
|
||||
cd ${{ github.workspace }}/${{ inputs.example }}/docker_image_build
|
||||
docker_compose_path=${{ github.workspace }}/${{ inputs.example }}/docker_image_build/build.yaml
|
||||
source ${{ github.workspace }}/.github/env/_build_image.sh
|
||||
if [[ $(grep -c "vllm:" ${docker_compose_path}) != 0 ]]; then
|
||||
git clone https://github.com/vllm-project/vllm.git && cd vllm
|
||||
VLLM_VER=v0.8.3
|
||||
echo "Check out vLLM tag ${VLLM_VER}"
|
||||
git checkout ${VLLM_VER} &> /dev/null && cd ../
|
||||
git clone -b ${VLLM_VER} --single-branch https://github.com/vllm-project/vllm.git
|
||||
fi
|
||||
if [[ $(grep -c "vllm-gaudi:" ${docker_compose_path}) != 0 ]]; then
|
||||
git clone https://github.com/HabanaAI/vllm-fork.git && cd vllm-fork
|
||||
VLLM_FORK_VER=v0.6.6.post1+Gaudi-1.20.0
|
||||
echo "Check out vLLM tag ${VLLM_FORK_VER}"
|
||||
git checkout ${VLLM_FORK_VER} &> /dev/null && cd ../
|
||||
git clone -b ${VLLM_FORK_VER} --single-branch https://github.com/HabanaAI/vllm-fork.git
|
||||
fi
|
||||
git clone --depth 1 --branch ${{ inputs.opea_branch }} https://github.com/opea-project/GenAIComps.git
|
||||
cd GenAIComps && git rev-parse HEAD && cd ../
|
||||
|
||||
30
.github/workflows/daily-update-vllm-version.yml
vendored
30
.github/workflows/daily-update-vllm-version.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
repo_name: vllm-project/vllm
|
||||
ver_name: VLLM_VER
|
||||
- repo: vLLM-fork
|
||||
repo_url: HabanaAI/vllm-fork
|
||||
repo_name: HabanaAI/vllm-fork
|
||||
ver_name: VLLM_FORK_VER
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -55,8 +55,9 @@ jobs:
|
||||
- name: Run script
|
||||
run: |
|
||||
latest_vllm_ver=$(curl -s "https://api.github.com/repos/${{ matrix.repo_name }}/tags" | jq '.[0].name' -)
|
||||
latest_vllm_ver=$(echo "$latest_vllm_ver" | sed 's/"//g')
|
||||
echo "latest_vllm_ver=${latest_vllm_ver}" >> "$GITHUB_ENV"
|
||||
find . -type f \( -name "*.sh" -o -name "_build_image.yml" \) -exec sed -i "s/${{ matrix.ver_name }}=.*/${{ matrix.ver_name }}=${latest_vllm_ver}/" {} \;
|
||||
find . -type f -name "*.sh" -exec sed -i "s/${{ matrix.ver_name }}=.*/${{ matrix.ver_name }}=${latest_vllm_ver}/" {} \;
|
||||
|
||||
- name: Commit changes
|
||||
run: |
|
||||
@@ -66,28 +67,27 @@ jobs:
|
||||
exit 1
|
||||
else
|
||||
git commit -s -m "Update ${{ matrix.repo }} version to ${latest_vllm_ver}"
|
||||
git push
|
||||
git push --set-upstream origin ${{ env.BRANCH_NAME }}_${{ matrix.repo }}
|
||||
fi
|
||||
|
||||
- name: Create Pull Request
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.ACTION_TOKEN }}
|
||||
run: |
|
||||
pr_count=$(curl -H "Authorization: token ${{ secrets.ACTION_TOKEN }}" -s "https://api.github.com/repos/${{ github.repository }}/pulls?state=all&head=${{ env.USER_NAME }}:${{ env.BRANCH_NAME }}_${{ matrix.repo }}" | jq '. | length')
|
||||
if [ $pr_count -gt 0 ]; then
|
||||
echo "Pull Request exists"
|
||||
pr_number=$(curl -H "Authorization: token ${{ secrets.ACTION_TOKEN }}" -s "https://api.github.com/repos/${{ github.repository }}/pulls?state=all&head=${{ env.USER_NAME }}:${{ env.BRANCH_NAME }}_${{ matrix.repo }}" | jq '.[0].number')
|
||||
curl -X PATCH -H "Authorization: token ${{ secrets.ACTION_TOKEN }}" -d "{
|
||||
\"title\":\"Update ${{ matrix.repo }} version to ${latest_vllm_ver}\",
|
||||
\"body\":\"Update ${{ matrix.repo }} version to ${latest_vllm_ver}\",
|
||||
\"state\":\"open\"
|
||||
}" "https://api.github.com/repos/${{ github.repository }}/pulls/${pr_number}"
|
||||
gh pr edit ${pr_number} \
|
||||
--title "Update ${{ matrix.repo }} version to ${latest_vllm_ver}" \
|
||||
--body "Update ${{ matrix.repo }} version to ${latest_vllm_ver}"
|
||||
echo "Pull Request updated successfully"
|
||||
else
|
||||
echo "Pull Request not exists..."
|
||||
curl -H "Authorization: token ${{ secrets.ACTION_TOKEN }}" -d "{
|
||||
\"title\":\"Update ${{ matrix.repo }} version to ${latest_vllm_ver}\",
|
||||
\"body\":\"Update ${{ matrix.repo }} version to ${latest_vllm_ver}\",
|
||||
\"head\":\"${{ env.USER_NAME }}:${{ env.BRANCH_NAME }}_${{ matrix.repo }}\",
|
||||
\"base\":\"main\"
|
||||
}" "https://api.github.com/repos/${{ github.repository }}/pulls"
|
||||
echo "Pull Request does not exists..."
|
||||
gh pr create \
|
||||
-B main \
|
||||
-H ${{ env.BRANCH_NAME }}_${{ matrix.repo }} \
|
||||
--title "Update ${{ matrix.repo }} version to ${latest_vllm_ver}" \
|
||||
--body "Update ${{ matrix.repo }} version to ${latest_vllm_ver}"
|
||||
echo "Pull Request created successfully"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user