Files
gemma4-bi150/Dockerfile
xiejiahao 05f1c3932f
All checks were successful
Docker Build and Push / docker (push) Successful in 1m11s
Unified Gemma 4 family image for Gemma-4-31B and GEV-26B-Decide
- detect_model.py picks TP/port/served name/eager/util from config.json
- validate TP against the model config (dense global KV heads, MoE k % 32)
- one apply_patch.py covers both variants, idempotent
- Dockerfile stays generic: no ENV/WORKDIR/EXPOSE/ENTRYPOINT
- run.sh/verify.sh follow the llama4-bi150 layout
2026-10-27 14:19:51 +08:00

42 lines
1.8 KiB
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Gemma 4 family on Iluvatar BI-V150
#
# 一个镜像同时支持:
# - Gemma-4-31B-it (dense,TP4,4 卡,8095,eager 关)
# - GEV-26B-Decide (MoE,TP2,2 卡,8094,eager 开)
#
# 两个变体共用同一个基础镜像和同一组补丁,差别只在 TP / 端口 / served name /
# eager / 显存 / 并发数,全部由入口脚本读 config.json 后决定。
#
# 镜像只包含运行时依赖和补丁,不设置 ENV / WORKDIR / EXPOSE / ENTRYPOINT / CMD;
# 模型路径、端口、TP、GPU、挂载等全部由 run.sh / docker-compose.yml 在启动时传入。
#
# 构建:
# docker build -t gemma4-bi150:2026-10-27 .
#
# 运行(由 run.sh 传入 entrypoint 和全部参数):
# ./run.sh /mnt/disk0/models/google/gemma-4-31B-it
# ./run.sh /mnt/disk0/models/autotrust/GEV-26B-Decide
#
# 补丁是针对下面这个精确基础镜像生成的;换基础镜像需要重新生成 diff。
# registry.iluvatar.com.cn:10443/customer/sz/vllm0.17.0-4.4.0-x86:v7
# (vLLM 0.17.0+corex.20260612070235)
FROM registry.iluvatar.com.cn:10443/customer/sz/vllm0.17.0-4.4.0-x86:v7
ARG IMAGE_VERSION=2026-10-27
LABEL org.opencontainers.image.title="gemma4-bi150" \
org.opencontainers.image.description="Gemma 4 31B-it / GEV-26B-Decide on Iluvatar BI-V150 with vLLM 0.17.0+corex" \
org.opencontainers.image.version="${IMAGE_VERSION}"
COPY apply_patch.py /opt/gemma4/apply_patch.py
COPY detect_model.py /opt/gemma4/detect_model.py
COPY entrypoint.sh /usr/local/bin/gemma4-entrypoint.sh
RUN chmod +x /usr/local/bin/gemma4-entrypoint.sh \
&& chmod +x /opt/gemma4/detect_model.py \
&& python3 /opt/gemma4/apply_patch.py
# 故意不设置 ENV / WORKDIR / EXPOSE / ENTRYPOINT / CMD:
# 镜像保持通用,启动方式由 run.sh 或 docker-compose.yml 决定。