This commit is contained in:
hailin 2025-08-08 22:03:31 +08:00
parent 1cd47a16ff
commit 28c3ac0b0f
1 changed files with 2 additions and 13 deletions

View File

@ -170,19 +170,8 @@ fi
git -C "${REPO_PATH}" submodule sync --recursive
git -C "${REPO_PATH}" submodule update --init --recursive --depth 1
# 安装 ds-kernelsDeepSpeed Inference CUTLASS 依赖)
DK_DIR=""
# 从 .gitmodules 找子模块路径(不同版本命名可能是 ds-kernels 或 dskernels
if [[ -f "${REPO_PATH}/.gitmodules" ]]; then
DK_DIR=$(git -C "${REPO_PATH}" config --file .gitmodules --get-regexp path | awk '/ds[-_]?kernels/{print $2; exit}' || true)
fi
if [[ -n "${DK_DIR}" && -f "${REPO_PATH}/${DK_DIR}/setup.py" ]]; then
log "Install ds-kernels from submodule: ${DK_DIR}"
pip install -v "${REPO_PATH}/${DK_DIR}"
else
log "Submodule ds-kernels 不存在或未包含构建脚本,直接从仓库安装"
pip install -v "git+https://github.com/microsoft/ds-kernels.git"
fi
# 不安装 ds-kernels纯训练环境不需要推理 CUTLASS 内核)
log "跳过 ds-kernels 安装(推理相关组件已禁用)"
# 基本健检
test -f "${REPO_PATH}/pyproject.toml" -o -f "${REPO_PATH}/setup.py" || die "DeepSpeed 源码目录缺少构建文件。"