From 1e44811d1166b1d150d720f51bdaf550605a27fa Mon Sep 17 00:00:00 2001 From: wanglin <2281216234@qq.com> Date: Sat, 3 Oct 2026 19:22:42 +0800 Subject: [PATCH] =?UTF-8?q?enginex-bi100-compat:=20=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E6=8B=A6=E6=88=AA=20vllm=20=E4=BA=8C=E8=BF=9B=E5=88=B6?= =?UTF-8?q?=EF=BC=88=E5=AF=B9=E9=BD=90=20zhengzhongwei/vLLM-Iluvatar=5Fbi-?= =?UTF-8?q?100-opt=20=E6=A8=A1=E5=BC=8F=EF=BC=89=EF=BC=8C=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E5=91=BD=E4=BB=A4=E6=97=A0=E9=9C=80=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test_engine.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test_engine.py b/test_engine.py index aa15480..32ea17d 100644 --- a/test_engine.py +++ b/test_engine.py @@ -25,7 +25,7 @@ import tempfile HERE = os.path.dirname(os.path.abspath(__file__)) PREFLIGHT = os.path.join(HERE, "preflight.py") -ENTRYPOINT = os.path.join(HERE, "entrypoint.sh") +WRAPPER = os.path.join(HERE, "vllm_wrapper.sh") DETECT = os.path.join(HERE, "detect_tokenizer.py") PASS, FAIL = [], [] @@ -163,11 +163,13 @@ def main(): # ---- 9:entrypoint 语法 + detect ---- print("[8] entrypoint.sh / detect_tokenizer.py") - p = subprocess.run(["bash", "-n", "entrypoint.sh"], capture_output=True, text=True, cwd=HERE) - check("entrypoint.sh bash 语法正确", p.returncode == 0, p.stderr[:200]) - shutil.copy2(ENTRYPOINT, os.path.join(tmp, "ep.sh")) - p1 = subprocess.run(["bash", "-n", "ep.sh"], capture_output=True, text=True, cwd=tmp) - check("entrypoint.sh 复制后语法仍正确", p1.returncode == 0, p1.stderr[:200]) + p1 = subprocess.run(["bash", "-n", "vllm_wrapper.sh"], capture_output=True, text=True, cwd=HERE) + check("vllm_wrapper.sh bash 语法正确", p1.returncode == 0, p1.stderr[:200]) + # wrapper 必须拦截 serve 且不外改其它子命令 + wr = io.open(os.path.join(HERE, "vllm_wrapper.sh"), encoding="utf-8").read() + check("wrapper 拦截 serve ", 'serve' in wr and 'MODEL_DIR="$2"' in wr) + check("wrapper 里 preflight 失败不阻断(有 try/兜底)", 'preflight 非 0 退出' in wr) + check("wrapper 最终 exec 的是 vllm_real", 'exec "$REAL" serve' in wr) p2 = subprocess.run([sys.executable, DETECT, d], capture_output=True, text=True) check("detect_tokenizer 可执行且报 fast", "fast" in p2.stdout, p2.stdout[:100] + p2.stderr[:200])