From d018aeb5fa99e48049b518e0ffbea7eb238894f3 Mon Sep 17 00:00:00 2001 From: Li Wang Date: Fri, 6 Feb 2026 10:54:03 +0800 Subject: [PATCH] [Image] Bump mooncake version to v0.3.8.post1 (#6428) ### What this PR does / why we need it? This patch bump the mooncake version to the latest [release](https://github.com/kvcache-ai/Mooncake/releases/tag/v0.3.8.post1) ### Does this PR introduce _any_ user-facing change? ### How was this patch tested? test is locally >>> from mooncake.engine import TransferEngine - vLLM version: v0.14.1 - vLLM main: https://github.com/vllm-project/vllm/commit/dc917cceb877dfd13f98c538c4c96158047d98bd --------- Signed-off-by: wangli --- .../schedule_image_build_and_push.yaml | 7 ++- Dockerfile | 6 +- Dockerfile.a3 | 6 +- Dockerfile.a3.openEuler | 2 +- Dockerfile.openEuler | 2 +- .../pd_colocated_mooncake_multi_instance.md | 2 +- .../pd_disaggregation_mooncake_single_node.md | 2 +- .../user_guide/feature_guide/kv_pool.md | 2 +- tests/e2e/nightly/multi_node/scripts/run.sh | 5 ++ tools/mooncake_installer.sh | 57 +++++++++++-------- 10 files changed, 57 insertions(+), 34 deletions(-) diff --git a/.github/workflows/schedule_image_build_and_push.yaml b/.github/workflows/schedule_image_build_and_push.yaml index 3e0198db..238c9b90 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: @@ -33,6 +37,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: @@ -59,7 +64,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 191275eb..a28ac7c2 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 @@ -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 6eb3b9ff..fd68662e 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/ @@ -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 && \ diff --git a/Dockerfile.a3.openEuler b/Dockerfile.a3.openEuler index 5fb7634f..1636322f 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 4a7278cb..6ff70377 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 c6983779..0ea3bb64 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 4e5a5df4..8de8425b 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 fe2c674c..7e87b6d7 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 diff --git a/tests/e2e/nightly/multi_node/scripts/run.sh b/tests/e2e/nightly/multi_node/scripts/run.sh index a2e68f02..9b6ebaa6 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 b68362f1..d9a92bd4 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 @@ -109,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" @@ -126,6 +123,7 @@ if command -v apt-get &> /dev/null; then cmake \ git \ wget \ + unzip \ libibverbs-dev \ libgoogle-glog-dev \ libgtest-dev \ @@ -155,6 +153,7 @@ elif command -v yum &> /dev/null; then gcc-c++ \ make \ cmake \ + unzip \ git \ wget \ libibverbs-devel \ @@ -205,19 +204,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