enginex-bi100-compat: 补传 preflight/README/shim/自测 + 扁平化 Dockerfile(仓库无子目录,网页上传不再丢相对路径)

This commit is contained in:
2026-10-03 18:32:49 +08:00
parent 391302289d
commit 601a11ccf2
5 changed files with 696 additions and 6 deletions

View File

@@ -15,6 +15,9 @@
#
# 为什么选 bi-100:本人 37 个验证失败里,bi-100 单卡 10 例为全平台最集中;
# 且该卡社区通过率约 51%(15 张卡最低),修好收益最大。
#
# 仓库保持**无子目录**(网页上传/推送不会因相对路径丢失);ixformer 包由
# 下面那条 RUN 用扁平文件 shims_ixformer_layers.py 组装出来。
FROM git.modelhub.org.cn:9443/enginex-iluvatar/bi100-3.2.3-x86-ubuntu20.04-py3.10-poc-llm-infer:v1.2.3
@@ -26,16 +29,14 @@ LABEL org.opencontainers.image.title="enginex-bi100-compat" \
com.modelhubxc.engine.baseline="EngineX-Iluvatar/enginex-vllm-bi100-qwen36" \
com.modelhubxc.engine.pattern="EngineX-Sunrise/enginex-S2-vllm-fix-tokenizer"
# 修补脚本 + R7 纯 PyTorch shim(都只是小文本文件,无权重)
# 修补脚本 + R7 纯 PyTorch shim(都是小文本文件,无权重)
COPY preflight.py /opt/
COPY entrypoint.sh /opt/
COPY detect_tokenizer.py /opt/
COPY shims/ /opt/shims/
COPY shims_ixformer_layers.py /opt/shims_src/
RUN chmod +x /opt/entrypoint.sh /opt/preflight.py \
&& python3 -c "import ast,io;[ast.parse(io.open(f,encoding='utf-8').read()) for f in ['/opt/preflight.py','/opt/detect_tokenizer.py','/opt/shims/ixformer/contrib/vllm/layers/__init__.py']]" \
&& bash -n /opt/entrypoint.sh \
&& echo "[enginex-bi100-compat] preflight syntax OK"
# 组装 ixformer.contrib.vllm.layers 包(R7 兜底,只有真缺模块时才会被 import)
RUN set -eux && mkdir -p /opt/shims/ixformer/contrib/vllm/layers && for d in /opt/shims/ixformer /opt/shims/ixformer/contrib /opt/shims/ixformer/contrib/vllm /opt/shims/ixformer/contrib/vllm/layers; do printf '# ModelHub XC compat shim package\n' > "$d/__init__.py"; done && cp /opt/shims_src/shims_ixformer_layers.py /opt/shims/ixformer/contrib/vllm/layers/__init__.py && rm -rf /opt/shims_src && chmod +x /opt/entrypoint.sh /opt/preflight.py && python3 -c "import ast,io;[ast.parse(io.open(f,encoding='utf-8').read()) for f in ['/opt/preflight.py','/opt/detect_tokenizer.py','/opt/shims/ixformer/contrib/vllm/layers/__init__.py']]" && bash -n /opt/entrypoint.sh && echo "[enginex-bi100-compat] preflight syntax OK"
# R7:让 shims 全局可 import(平台若覆盖 entrypoint 也仍然生效)
ENV PYTHONPATH=/opt/shims:${PYTHONPATH}