ci: 将 simulator 内部依赖统一到单一 venv#974
Draft
mouliangyu wants to merge 1 commit into
Draft
Conversation
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
ci-sim的多个 self-hosted runner 会并发使用同一套全局 Pythonsite-packages。PyPTO 和 simpler 在安装时会先卸载已有版本,可能在其他 job 运行测试时删除 runtime assets,导致runtime.h、tensor.h、cache_ops.cpp等文件偶发缺失。改动
vpto-sim-validationjob 创建项目内的.work/ci-sim-venv,而不是仅隔离 PyPTO 安装步骤。CI_SIM_BASE_PYTHON_BIN;默认指向当前 runner 池的torchnpu310,并允许通过 repository variable 覆盖,不再扫描文件系统寻找 Python。--system-site-packages只读复用基础解释器中的torch/torch_npu第三方依赖。PIP_REQUIRE_VIRTUALENV=true,防止后续步骤误写共享 Python 环境。验证
git diff --checkvpto-sim-validation的 30 个 shell step 全部通过bash -n--system-site-packagesvenv,成功导入torch 2.10.0+cpu和torch_npu 2.10.0完整 simulator 回归交由本 PR 的
ci-simworkflow 验证。