From 30742af3ea4f3762c34e655e077e3994657d5a09 Mon Sep 17 00:00:00 2001 From: wangli Date: Fri, 30 Jan 2026 16:57:45 +0800 Subject: [PATCH 1/4] update install script Signed-off-by: wangli --- tools/mooncake_installer.sh | 45 +++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/tools/mooncake_installer.sh b/tools/mooncake_installer.sh index b68362f12eb..d03689bf63f 100644 --- a/tools/mooncake_installer.sh +++ b/tools/mooncake_installer.sh @@ -30,19 +30,7 @@ NC="\033[0m" # No Color REPO_ROOT=`pwd` GITHUB_PROXY=${GITHUB_PROXY:-"https://github.com"} GOVER=1.23.8 -SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" - -# Define a function to handle the git clone operation -clone_repo_if_not_exists() { - local repo_dir=$1 - local repo_url=$2 - - if [ ! -d "$repo_dir" ]; then - git clone --depth 1 "$repo_url" - else - echo "Directory $repo_dir already exists, skipping clone." - fi -} +YALANTINGLIBS_VERSION=0.5.6 # Function to print section headers print_section() { @@ -67,9 +55,6 @@ check_success() { fi } -if [ $(id -u) -ne 0 ]; then - print_error "Require root permission, try sudo ./dependencies.sh" -fi # Parse command line arguments SKIP_CONFIRM=false @@ -126,6 +111,7 @@ if command -v apt-get &> /dev/null; then cmake \ git \ wget \ + unzip \ libibverbs-dev \ libgoogle-glog-dev \ libgtest-dev \ @@ -155,6 +141,7 @@ elif command -v yum &> /dev/null; then gcc-c++ \ make \ cmake \ + unzip \ git \ wget \ libibverbs-devel \ @@ -205,19 +192,29 @@ cd "${REPO_ROOT}/thirdparties" check_success "Failed to change to thirdparties directory" # Check if yalantinglibs is already installed -if [ -d "yalantinglibs" ]; then - echo -e "${YELLOW}yalantinglibs directory already exists. Removing for fresh install...${NC}" - rm -rf yalantinglibs +if [ -d "yalantinglibs-${YALANTINGLIBS_VERSION}" ]; then + echo -e "${YELLOW}yalantinglibs-${YALANTINGLIBS_VERSION} directory already exists. Removing for fresh install...${NC}" + rm -rf yalantinglibs-${YALANTINGLIBS_VERSION} check_success "Failed to remove existing yalantinglibs directory" fi -# Clone yalantinglibs -echo "Cloning yalantinglibs from ${GITHUB_PROXY}/alibaba/yalantinglibs.git" -git clone -b 0.5.5 --depth 1 ${GITHUB_PROXY}/alibaba/yalantinglibs.git -check_success "Failed to clone yalantinglibs" +# Download yalantinglibs +YALANTINGLIBS_ZIPFILE="yalantinglibs-${YALANTINGLIBS_VERSION}.zip" +echo "Downloading yalantinglibs ${YALANTINGLIBS_VERSION} from ${GITHUB_PROXY}/alibaba/yalantinglibs/archive/refs/tags/${YALANTINGLIBS_VERSION}.zip" +wget -q --show-progress -O ${YALANTINGLIBS_ZIPFILE} ${GITHUB_PROXY}/alibaba/yalantinglibs/archive/refs/tags/${YALANTINGLIBS_VERSION}.zip +check_success "Failed to download yalantinglibs" + +# Extract yalantinglibs +echo "Extracting yalantinglibs..." +unzip -q ${YALANTINGLIBS_ZIPFILE} +check_success "Failed to extract yalantinglibs" + +# Clean up downloaded ZIP file +rm -f ${YALANTINGLIBS_ZIPFILE} +check_success "Failed to clean up downloaded ZIP file" # Build and install yalantinglibs -cd yalantinglibs +cd yalantinglibs-${YALANTINGLIBS_VERSION} check_success "Failed to change to yalantinglibs directory" mkdir -p build From 914b2ac90352fbafd20c01cd92df4c12593e45d4 Mon Sep 17 00:00:00 2001 From: wangli Date: Fri, 30 Jan 2026 17:01:44 +0800 Subject: [PATCH 2/4] upgrade mooncake to v0.3.8.post1 Signed-off-by: wangli --- .github/workflows/schedule_image_build_and_push.yaml | 7 ++++++- Dockerfile | 2 +- Dockerfile.a3 | 2 +- Dockerfile.a3.openEuler | 2 +- Dockerfile.openEuler | 2 +- .../tutorials/pd_colocated_mooncake_multi_instance.md | 2 +- .../tutorials/pd_disaggregation_mooncake_single_node.md | 2 +- docs/source/user_guide/feature_guide/kv_pool.md | 2 +- 8 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/schedule_image_build_and_push.yaml b/.github/workflows/schedule_image_build_and_push.yaml index a085b7907bc..1cce5a69efc 100644 --- a/.github/workflows/schedule_image_build_and_push.yaml +++ b/.github/workflows/schedule_image_build_and_push.yaml @@ -17,6 +17,10 @@ on: push: tags: - 'v*' + pull_request: + branches: + - 'main' + types: [ labeled, synchronize ] workflow_dispatch: inputs: tag: @@ -28,6 +32,7 @@ on: jobs: image_build: name: Image Build and Push + if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'image-build') }} strategy: matrix: build_meta: @@ -54,7 +59,7 @@ jobs: dockerfile: ${{ matrix.build_meta.dockerfile }} suffix: ${{ matrix.build_meta.suffix }} quay_username: ${{ vars.QUAY_USERNAME }} - should_push: ${{ github.repository_owner == 'vllm-project' }} + should_push: ${{ github.repository_owner == 'vllm-project' && (github.event_name != 'pull_request') }} workflow_dispatch_tag: ${{ inputs.tag }} secrets: QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} diff --git a/Dockerfile b/Dockerfile index 02e2820969a..f3d104a7cb3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ FROM quay.io/ascend/cann:8.5.0-910b-ubuntu22.04-py3.11 ARG PIP_INDEX_URL="https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple" -ARG MOONCAKE_TAG="v0.3.7.post2" +ARG MOONCAKE_TAG="v0.3.8.post1" ARG SOC_VERSION="ascend910b1" # Define environments diff --git a/Dockerfile.a3 b/Dockerfile.a3 index 7688c14d6a8..56262e8ca97 100644 --- a/Dockerfile.a3 +++ b/Dockerfile.a3 @@ -18,7 +18,7 @@ FROM quay.io/ascend/cann:8.5.0-a3-ubuntu22.04-py3.11 ARG PIP_INDEX_URL="https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple" -ARG MOONCAKE_TAG=v0.3.7.post2 +ARG MOONCAKE_TAG=v0.3.8.post1 ARG SOC_VERSION="ascend910_9391" COPY . /vllm-workspace/vllm-ascend/ diff --git a/Dockerfile.a3.openEuler b/Dockerfile.a3.openEuler index 6129adc7982..3d7e9ceeffd 100644 --- a/Dockerfile.a3.openEuler +++ b/Dockerfile.a3.openEuler @@ -18,7 +18,7 @@ FROM quay.io/ascend/cann:8.5.0-a3-openeuler24.03-py3.11 ARG PIP_INDEX_URL="https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple" -ARG MOONCAKE_TAG="v0.3.7.post2" +ARG MOONCAKE_TAG="v0.3.8.post1" ARG SOC_VERSION="ascend910_9391" ENV SOC_VERSION=$SOC_VERSION \ diff --git a/Dockerfile.openEuler b/Dockerfile.openEuler index 7603372f6af..a76272ac5c9 100644 --- a/Dockerfile.openEuler +++ b/Dockerfile.openEuler @@ -18,7 +18,7 @@ FROM quay.io/ascend/cann:8.5.0-910b-openeuler24.03-py3.11 ARG PIP_INDEX_URL="https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple" -ARG MOONCAKE_TAG="v0.3.7.post2" +ARG MOONCAKE_TAG="v0.3.8.post1" ARG SOC_VERSION="ascend910b1" ENV SOC_VERSION=$SOC_VERSION \ diff --git a/docs/source/tutorials/pd_colocated_mooncake_multi_instance.md b/docs/source/tutorials/pd_colocated_mooncake_multi_instance.md index c6983779aab..0ea3bb642ef 100644 --- a/docs/source/tutorials/pd_colocated_mooncake_multi_instance.md +++ b/docs/source/tutorials/pd_colocated_mooncake_multi_instance.md @@ -121,7 +121,7 @@ Moonshot AI. Installation and compilation guide: First, obtain the Mooncake project using the following command: ```bash -git clone -b v0.3.7.post2 --depth 1 https://github.com/kvcache-ai/Mooncake.git +git clone -b v0.3.8.post1 --depth 1 https://github.com/kvcache-ai/Mooncake.git cd Mooncake git submodule update --init --recursive ``` diff --git a/docs/source/tutorials/pd_disaggregation_mooncake_single_node.md b/docs/source/tutorials/pd_disaggregation_mooncake_single_node.md index 4e5a5df462f..8de8425bea1 100644 --- a/docs/source/tutorials/pd_disaggregation_mooncake_single_node.md +++ b/docs/source/tutorials/pd_disaggregation_mooncake_single_node.md @@ -98,7 +98,7 @@ Mooncake is the serving platform for Kimi, a leading LLM service provided by Moo First, we need to obtain the Mooncake project. Refer to the following command: ```shell -git clone -b v0.3.7.post2 --depth 1 https://github.com/kvcache-ai/Mooncake.git +git clone -b v0.3.8.post1 --depth 1 https://github.com/kvcache-ai/Mooncake.git ``` (Optional) Replace go install url if the network is poor diff --git a/docs/source/user_guide/feature_guide/kv_pool.md b/docs/source/user_guide/feature_guide/kv_pool.md index 63f3d26f6cf..f34a901bbd2 100644 --- a/docs/source/user_guide/feature_guide/kv_pool.md +++ b/docs/source/user_guide/feature_guide/kv_pool.md @@ -42,7 +42,7 @@ export PYTHONHASHSEED=0 First, we need to obtain the Mooncake project. Refer to the following command: ```shell - git clone -b v0.3.7.post2 --depth 1 https://github.com/kvcache-ai/Mooncake.git + git clone -b v0.3.8.post1 --depth 1 https://github.com/kvcache-ai/Mooncake.git ``` (Optional) Replace go install url if the network is poor From 64ce5d2a45fbe4018fae6aa83c5206e221916569 Mon Sep 17 00:00:00 2001 From: wangli Date: Sat, 31 Jan 2026 11:58:33 +0800 Subject: [PATCH 3/4] fix Signed-off-by: wangli --- tests/e2e/nightly/multi_node/scripts/run.sh | 5 +++++ tools/mooncake_installer.sh | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/tests/e2e/nightly/multi_node/scripts/run.sh b/tests/e2e/nightly/multi_node/scripts/run.sh index a2e68f02b22..9b6ebaa6783 100644 --- a/tests/e2e/nightly/multi_node/scripts/run.sh +++ b/tests/e2e/nightly/multi_node/scripts/run.sh @@ -10,6 +10,11 @@ NC="\033[0m" # No Color # Configuration export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/python/site-packages:$LD_LIBRARY_PATH +export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH +# cann and atb environment setup +source /usr/local/Ascend/ascend-toolkit/set_env.sh +source /usr/local/Ascend/cann-8.5.0/share/info/ascendnpu-ir/bin/set_env.sh +source /usr/local/Ascend/nnal/atb/set_env.sh # Home path for aisbench export BENCHMARK_HOME=${WORKSPACE}/vllm-ascend/benchmark diff --git a/tools/mooncake_installer.sh b/tools/mooncake_installer.sh index d03689bf63f..d9a92bd4237 100644 --- a/tools/mooncake_installer.sh +++ b/tools/mooncake_installer.sh @@ -94,6 +94,18 @@ if [ "$SKIP_CONFIRM" = false ]; then fi fi +# Define a function to handle the git clone operation +clone_repo_if_not_exists() { + local repo_dir=$1 + local repo_url=$2 + + if [ ! -d "$repo_dir" ]; then + git clone --depth 1 "$repo_url" + else + echo "Directory $repo_dir already exists, skipping clone." + fi +} + # Update package lists print_section "Updating package lists" From ba57207e1234b226c32434e9b4f2ebfb7132c0ad Mon Sep 17 00:00:00 2001 From: wangli Date: Sat, 31 Jan 2026 15:54:46 +0800 Subject: [PATCH 4/4] mock for driver Signed-off-by: wangli --- Dockerfile | 4 +++- Dockerfile.a3 | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f3d104a7cb3..548825b185a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,9 @@ RUN apt-get update -y && \ git clone --depth 1 --branch ${MOONCAKE_TAG} https://github.com/kvcache-ai/Mooncake /vllm-workspace/Mooncake && \ cp /vllm-workspace/vllm-ascend/tools/mooncake_installer.sh /vllm-workspace/Mooncake/ && \ cd /vllm-workspace/Mooncake && bash mooncake_installer.sh -y && \ - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/`uname -i`-linux/lib64 && \ + ARCH=$(uname -m) && \ + source /usr/local/Ascend/ascend-toolkit/set_env.sh && \ + export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/${ARCH}-linux/devlib:/usr/local/Ascend/ascend-toolkit/latest/${ARCH}-linux/lib64:$LD_LIBRARY_PATH && \ mkdir -p build && cd build && cmake .. -DUSE_ASCEND_DIRECT=ON && \ make -j$(nproc) && make install && \ rm -fr /vllm-workspace/Mooncake/build && \ diff --git a/Dockerfile.a3 b/Dockerfile.a3 index 56262e8ca97..d839ae2a40a 100644 --- a/Dockerfile.a3 +++ b/Dockerfile.a3 @@ -38,7 +38,9 @@ RUN apt-get update -y && \ git clone --depth 1 --branch ${MOONCAKE_TAG} https://github.com/kvcache-ai/Mooncake /vllm-workspace/Mooncake && \ cp /vllm-workspace/vllm-ascend/tools/mooncake_installer.sh /vllm-workspace/Mooncake/ && \ cd /vllm-workspace/Mooncake && bash mooncake_installer.sh -y && \ - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/`uname -i`-linux/lib64 && \ + ARCH=$(uname -m) && \ + source /usr/local/Ascend/ascend-toolkit/set_env.sh && \ + export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/${ARCH}-linux/devlib:/usr/local/Ascend/ascend-toolkit/latest/${ARCH}-linux/lib64:$LD_LIBRARY_PATH && \ mkdir -p build && cd build && cmake .. -DUSE_ASCEND_DIRECT=ON && \ make -j$(nproc) && make install && \ rm -fr /vllm-workspace/Mooncake/build && \