2026-10-26 16:24:16 +08:00
|
|
|
|
# Llama 4 Scout / Maverick on Iluvatar BI-V150
|
|
|
|
|
|
#
|
|
|
|
|
|
# 一个镜像同时支持:
|
|
|
|
|
|
# - Llama-4-Scout-17B-16E-Instruct(BF16,TP8,8 卡)
|
|
|
|
|
|
# - Llama-4-Maverick-17B-128E-Instruct-FP8(FP8,TP8+PP2,16 卡)
|
|
|
|
|
|
#
|
2026-10-26 18:53:54 +08:00
|
|
|
|
# 镜像只包含运行时依赖和 Llama 4 补丁,不设置启动命令、ENV、WORKDIR 或 EXPOSE;
|
|
|
|
|
|
# 模型路径、端口、TP/PP、GPU、挂载等全部由 run.sh / docker-compose.yml 在启动时传入。
|
2026-10-26 16:24:16 +08:00
|
|
|
|
#
|
|
|
|
|
|
# 构建:
|
|
|
|
|
|
# docker build -t llama4-bi150:2026-10-26 .
|
|
|
|
|
|
#
|
2026-10-26 18:53:54 +08:00
|
|
|
|
# 运行(由 run.sh 传入 entrypoint 和全部参数):
|
2026-10-26 16:59:44 +08:00
|
|
|
|
# ./run.sh /mnt/disk0/models/LLM-Research/Llama-4-Scout-17B-16E-Instruct
|
|
|
|
|
|
# ./run.sh /mnt/disk0/models/LLM-Research/Llama-4-Maverick-17B-128E-Instruct-FP8
|
2026-10-26 16:24:16 +08:00
|
|
|
|
#
|
|
|
|
|
|
# 补丁是针对下面这个精确基础镜像生成的;换基础镜像需要重新生成 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-26
|
|
|
|
|
|
|
|
|
|
|
|
LABEL org.opencontainers.image.title="llama4-bi150" \
|
|
|
|
|
|
org.opencontainers.image.description="Llama 4 Scout / Maverick on Iluvatar BI-V150 with vLLM 0.17.0+corex" \
|
|
|
|
|
|
org.opencontainers.image.version="${IMAGE_VERSION}"
|
|
|
|
|
|
|
|
|
|
|
|
COPY patches /opt/llama4/patches
|
|
|
|
|
|
COPY apply_patch.py /opt/llama4/apply_patch.py
|
2026-10-26 16:59:44 +08:00
|
|
|
|
COPY detect_model.py /opt/llama4/detect_model.py
|
2026-10-26 16:24:16 +08:00
|
|
|
|
COPY entrypoint.sh /usr/local/bin/llama4-entrypoint.sh
|
|
|
|
|
|
|
|
|
|
|
|
RUN chmod +x /usr/local/bin/llama4-entrypoint.sh \
|
2026-10-26 16:59:44 +08:00
|
|
|
|
&& chmod +x /opt/llama4/detect_model.py \
|
2026-10-26 16:24:16 +08:00
|
|
|
|
&& python3 /opt/llama4/apply_patch.py
|
|
|
|
|
|
|
2026-10-26 18:53:54 +08:00
|
|
|
|
# 故意不设置 ENV / WORKDIR / EXPOSE / ENTRYPOINT / CMD:
|
|
|
|
|
|
# 镜像保持通用,启动方式由 run.sh 或 docker-compose.yml 决定。
|