diff --git a/.jenkins/test/config/dependent_packages.yaml b/.jenkins/test/config/dependent_packages.yaml index a4654574d194fed3a90a6db92d9ffa9bbf3eb61a..71e750eeb7595b5a6553e09b7710ea6cd8992de8 100644 --- a/.jenkins/test/config/dependent_packages.yaml +++ b/.jenkins/test/config/dependent_packages.yaml @@ -1,11 +1,11 @@ mindspore: - 'https://repo.mindspore.cn/mindspore/mindspore/version/202508/20250807/r2.7_20250807154652_7edec76ede691ac90be9590b0ebb2a65923b55fe_newest/' + 'https://ms-release.obs.cn-north-4.myhuaweicloud.com/2.7.0/MindSpore/' mindspore_gs: - 'https://repo.mindspore.cn/mindspore/golden-stick/version/202508/20250806/r1.2.0_20250806120007_eaf90684e2eed9c135c4a64d3ea9c7c70d8ced74_newest/' + 'https://ms-release.obs.cn-north-4.myhuaweicloud.com/2.7.0/GoldenStick/' msadapter: 'https://repo.mindspore.cn/mindspore/msadapter/version/202508/20250807/r0.2.0_20250807013007_e7636d61563c4beafac4b877891172464fdcf321_newest/' vllm: - 'https://repo.mindspore.cn/mirrors/vllm/version/202505/20250514/v0.8.4.dev0_newest/' + 'https://repo.mindspore.cn/mirrors/vllm/version/202505/20250514/v0.8.4.dev0_newest/' \ No newline at end of file diff --git a/build_image.sh b/build_image.sh index 7459bcf0bea387701bb14273f567dc3c45d5d9fa..21141c3991c06ed8b6e5a3de07ac03c089e3b23e 100644 --- a/build_image.sh +++ b/build_image.sh @@ -40,12 +40,16 @@ FROM base_env COPY install_depend_pkgs.sh /workspace/ COPY .jenkins/test/config/dependent_packages.yaml /workspace/.jenkins/test/config/ +ADD ./ /workspace/vllm_mindspore ARG MINDFORMERS_COMMIT=$mindformers_commit -RUN chmod +x /workspace/install_depend_pkgs.sh && \\ - cd /workspace && \\ +RUN chmod +x /workspace/vllm_mindspore/install_depend_pkgs.sh && \\ + cd /workspace/vllm_mindspore && \\ MINDFORMERS_COMMIT=\$MINDFORMERS_COMMIT AUTO_BUILD=1 ./install_depend_pkgs.sh +RUN cd /workspace/vllm_mindspore && \\ + pip install . + ENV PYTHONPATH="/workspace/mindformers/:\$PYTHONPATH" ENV vLLM_MODEL_BACKEND=MindFormers WORKDIR /workspace diff --git a/install_depend_pkgs.sh b/install_depend_pkgs.sh index 0e03cc7cce3464cf86fbe02291f5c6a22e89be0d..c9c44576abb854798aa50752323db06f91d30602 100644 --- a/install_depend_pkgs.sh +++ b/install_depend_pkgs.sh @@ -27,9 +27,9 @@ log() { echo "========= $*"; } pip_install() { if [ "$FORCE_REINSTALL" = true ]; then - uv pip install --system --no-cache-dir --force-reinstall --trusted-host repo.mindspore.cn --trusted-host mirrors.aliyun.com -i https://mirrors.aliyun.com/pypi/simple "$@" + uv pip install --system --no-cache-dir --force-reinstall --trusted-host repo.mindspore.cn --trusted-host mirrors.aliyun.com --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://mirrors.aliyun.com/pypi/simple "$@" else - uv pip install --system --no-cache-dir --trusted-host repo.mindspore.cn --trusted-host mirrors.aliyun.com -i https://mirrors.aliyun.com/pypi/simple "$@" + uv pip install --system --no-cache-dir --trusted-host repo.mindspore.cn --trusted-host mirrors.aliyun.com --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://mirrors.aliyun.com/pypi/simple "$@" fi } @@ -72,6 +72,24 @@ get_package_url() { echo "${base_url}${wheel_url}" } +get_obs_package_url() { + local package="$1" + local version="$2" + local arch="${3:-any}" + local base_url=$(grep -A 1 -w "${package}:" "$CONFIG_FILE" | tail -n 1 | xargs) + + if [[ "$package" == "mindspore" ]]; then + local python_v="cp$(python3 --version 2>&1 | grep -oP 'Python \K\d+\.\d+' | tr -d .)" + local wheel_url="${base_url}${arch}/mindspore-${version}-${python_v}-${python_v}-linux_aarch64.whl" + elif [[ "$package" == "mindspore_gs" ]]; then + local wheel_url="${base_url}${arch}/mindspore_gs-${version}-py3-none-any.whl" + else + local wheel_url=$(curl -k -s "$base_url" | sed -n 's/.*href="\([^"]*\.whl\)".*/\1/p' | grep -v sha256 | head -n 1) + fi + + echo "${wheel_url}" +} + install_mindformers() { log "Installing mindformers" local commit_id=$(get_mindformers_commit) @@ -152,9 +170,9 @@ main() { log "Starting dependency installation" local vllm_url=$(get_package_url "vllm" "any") - local mindspore_url=$(get_package_url "mindspore" "unified/aarch64") + local mindspore_url=$(get_obs_package_url "mindspore" "2.7.0" "unified/aarch64") local msadapter_url=$(get_package_url "msadapter" "any") - local mindspore_gs_url=$(get_package_url "mindspore_gs" "any") + local mindspore_gs_url=$(get_obs_package_url "mindspore_gs" "1.2.0" "any") log "Package URLs:" log "vLLM: $vllm_url"