Scope engine image builds and verification by release target
All checks were successful
Build and verify Qwen2.5 compatibility engines / docker (push) Successful in 1m59s
All checks were successful
Build and verify Qwen2.5 compatibility engines / docker (push) Successful in 1m59s
This commit is contained in:
@@ -3,23 +3,33 @@ name: Build and verify Qwen2.5 compatibility engines
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
- "v*-nvidia-a100"
|
||||
- "v*-cambricon-mlu370"
|
||||
- "v*-metax-c500"
|
||||
- "v*-vastai-va16"
|
||||
- "v*-all"
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: amd64-ubuntu-24.04
|
||||
env:
|
||||
RELEASE_TAG: ${{ gitea.ref_name }}
|
||||
REPOSITORY: ${{ gitea.repository }}
|
||||
SERVER_URL: ${{ gitea.server_url }}
|
||||
ACTOR: ${{ gitea.actor }}
|
||||
steps:
|
||||
- name: Clone tagged source
|
||||
run: |
|
||||
git clone "${{ gitea.server_url }}/${{ gitea.repository }}.git" .
|
||||
git checkout "${{ gitea.ref_name }}"
|
||||
git clone "$SERVER_URL/$REPOSITORY.git" .
|
||||
git checkout "$RELEASE_TAG"
|
||||
|
||||
- name: Run compatibility tests
|
||||
run: |
|
||||
python3 -m unittest discover -s tests -q
|
||||
python3 -m py_compile engine_compat.py release_plan.py
|
||||
bash -n vllm_wrapper.sh
|
||||
|
||||
- name: Load image metadata
|
||||
- name: Select release targets and load image metadata
|
||||
run: |
|
||||
set -eu
|
||||
set -a
|
||||
@@ -27,10 +37,9 @@ jobs:
|
||||
set +a
|
||||
test -n "$FRAMEWORK"
|
||||
test -n "$TASK_TYPE"
|
||||
test -n "$GPU_TYPES"
|
||||
python3 release_plan.py "$RELEASE_TAG" --gitea-env "$GITEA_ENV"
|
||||
echo "FRAMEWORK=$FRAMEWORK" >> "$GITEA_ENV"
|
||||
echo "TASK_TYPE=$TASK_TYPE" >> "$GITEA_ENV"
|
||||
echo "GPU_TYPES=$GPU_TYPES" >> "$GITEA_ENV"
|
||||
|
||||
- name: Validate GPU and task metadata
|
||||
run: |
|
||||
@@ -58,29 +67,37 @@ jobs:
|
||||
- name: Build and push target images
|
||||
run: |
|
||||
set -eu
|
||||
image_name="$(printf '%s' '${{ gitea.repository }}' | tr '[:upper:]' '[:lower:]' | tr '_' '-')"
|
||||
image_name="$(printf '%s' "$REPOSITORY" | tr '[:upper:]' '[:lower:]' | tr '_' '-')"
|
||||
image_base="$DOCKER_REGISTRY/$DOCKER_USERNAME/$image_name"
|
||||
a100_image="$image_base:${{ gitea.ref_name }}-nvidia-a100"
|
||||
cambricon_image="$image_base:${{ gitea.ref_name }}-cambricon-mlu370"
|
||||
metax_image="$image_base:${{ gitea.ref_name }}-metax-c500"
|
||||
vastai_image="$image_base:${{ gitea.ref_name }}-vastai-va16"
|
||||
|
||||
docker build \
|
||||
--build-arg BASE_IMAGE=harbor.4pd.io/dooke/vllm/vllm/vllm-openai:v0.11.0 \
|
||||
-t "$a100_image" .
|
||||
docker build \
|
||||
--build-arg BASE_IMAGE=harbor.4pd.io/hardcore-tech/cambricon-mlu370-pytorch:v25.01-20260228 \
|
||||
-t "$cambricon_image" .
|
||||
docker build \
|
||||
--build-arg BASE_IMAGE=harbor.4pd.io/modelhubxc/enginex-metax/vllm:0.9.1 \
|
||||
--build-arg PYTHON_BIN=/opt/conda/bin/python3 \
|
||||
--build-arg VLLM_BIN=/opt/conda/bin/vllm \
|
||||
-t "$metax_image" .
|
||||
docker build \
|
||||
--build-arg BASE_IMAGE=harbor.4pd.io/modelhubxc/sunruoxi/enginex-vastai-vllm-vacc-fix-tokenizer:VVI-26.02 \
|
||||
-t "$vastai_image" .
|
||||
|
||||
for image in "$a100_image" "$cambricon_image" "$metax_image" "$vastai_image"; do
|
||||
echo "IMAGE_BASE=$image_base" >> "$GITEA_ENV"
|
||||
for target in $IMAGE_TARGETS; do
|
||||
if [ "$RELEASE_TARGET" = all ]; then
|
||||
image_tag="$RELEASE_TAG-$target"
|
||||
else
|
||||
image_tag="$RELEASE_TAG"
|
||||
fi
|
||||
image="$image_base:$image_tag"
|
||||
case "$target" in
|
||||
nvidia-a100)
|
||||
docker build \
|
||||
--build-arg BASE_IMAGE=harbor.4pd.io/dooke/vllm/vllm/vllm-openai:v0.11.0 \
|
||||
-t "$image" . ;;
|
||||
cambricon-mlu370)
|
||||
docker build \
|
||||
--build-arg BASE_IMAGE=harbor.4pd.io/hardcore-tech/cambricon-mlu370-pytorch:v25.01-20260228 \
|
||||
-t "$image" . ;;
|
||||
metax-c500)
|
||||
docker build \
|
||||
--build-arg BASE_IMAGE=harbor.4pd.io/modelhubxc/enginex-metax/vllm:0.9.1 \
|
||||
--build-arg PYTHON_BIN=/opt/conda/bin/python3 \
|
||||
--build-arg VLLM_BIN=/opt/conda/bin/vllm \
|
||||
-t "$image" . ;;
|
||||
vastai-va16)
|
||||
docker build \
|
||||
--build-arg BASE_IMAGE=harbor.4pd.io/modelhubxc/sunruoxi/enginex-vastai-vllm-vacc-fix-tokenizer:VVI-26.02 \
|
||||
-t "$image" . ;;
|
||||
*) echo "unknown image target: $target"; exit 1 ;;
|
||||
esac
|
||||
success=0
|
||||
for attempt in 1 2 3; do
|
||||
if docker push "$image"; then success=1; break; fi
|
||||
@@ -89,23 +106,24 @@ jobs:
|
||||
done
|
||||
test "$success" -eq 1
|
||||
done
|
||||
echo "A100_IMAGE=$a100_image" >> "$GITEA_ENV"
|
||||
echo "CAMBRICON_IMAGE=$cambricon_image" >> "$GITEA_ENV"
|
||||
echo "METAX_IMAGE=$metax_image" >> "$GITEA_ENV"
|
||||
echo "VASTAI_IMAGE=$vastai_image" >> "$GITEA_ENV"
|
||||
|
||||
- name: Notify ModelHub image verification
|
||||
run: |
|
||||
set -eu
|
||||
for gpu in $GPU_TYPES; do
|
||||
case "$gpu" in
|
||||
Nvidia-A100) image="$A100_IMAGE" ;;
|
||||
Cambricon_mlu-370-x4|Cambricon_mlu-370-x8) image="$CAMBRICON_IMAGE" ;;
|
||||
MetaX_c-500) image="$METAX_IMAGE" ;;
|
||||
Vastai_va16) image="$VASTAI_IMAGE" ;;
|
||||
*) echo "unknown GPU target: $gpu"; exit 1 ;;
|
||||
for mapping in $VERIFY_PAIRS; do
|
||||
gpu="${mapping%%:*}"
|
||||
target="${mapping#*:}"
|
||||
case " $IMAGE_TARGETS " in
|
||||
*" $target "*) ;;
|
||||
*) echo "GPU target was not built: $gpu"; exit 1 ;;
|
||||
esac
|
||||
payload="$(GPU_TYPE="$gpu" IMAGE="$image" REPO_URL='${{ gitea.server_url }}/${{ gitea.repository }}' TAG='${{ gitea.ref_name }}' ACTOR='${{ gitea.actor }}' python3 -c 'import json, os; print(json.dumps({"framework": os.environ["FRAMEWORK"], "gpuType": os.environ["GPU_TYPE"], "imageUrl": os.environ["IMAGE"], "taskType": os.environ["TASK_TYPE"], "createBy": os.environ["ACTOR"], "repoUrl": os.environ["REPO_URL"], "tag": os.environ["TAG"]}))')"
|
||||
if [ "$RELEASE_TARGET" = all ]; then
|
||||
image_tag="$RELEASE_TAG-$target"
|
||||
else
|
||||
image_tag="$RELEASE_TAG"
|
||||
fi
|
||||
image="$IMAGE_BASE:$image_tag"
|
||||
payload="$(GPU_TYPE="$gpu" IMAGE="$image" REPO_URL="$SERVER_URL/$REPOSITORY" TAG="$RELEASE_TAG" python3 -c 'import json, os; print(json.dumps({"framework": os.environ["FRAMEWORK"], "gpuType": os.environ["GPU_TYPE"], "imageUrl": os.environ["IMAGE"], "taskType": os.environ["TASK_TYPE"], "createBy": os.environ["ACTOR"], "repoUrl": os.environ["REPO_URL"], "tag": os.environ["TAG"]}))')"
|
||||
response="$(curl --silent --show-error --fail-with-body --location \
|
||||
--request POST 'https://modelhub.org.cn/adminApi/image-verify' \
|
||||
--header "Xc-Token: $FIXED_TOKEN" \
|
||||
|
||||
Reference in New Issue
Block a user