Files
llama-4-Scout-bi150/Dockerfile

52 lines
1.8 KiB
Docker
Raw Permalink 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.

# Llama 4 Scout on Iluvatar BI-V150
#
# 基础镜像就是当前 ugly_hopper / test 用的 CoreX vLLM 镜像。
# 这个 Dockerfile 做三件事:
# 1. 把 CoreX vLLM 的 Llama4 chunked-attention 补丁打进镜像
# 2. 安装 entrypoint(容器启动时再次幂等检查补丁)
# 3. 默认以 TP8 / 4096 ctx / 0.90 显存启动 vLLM
#
# 构建:
# docker build -t llama4-scout:2026-10-23 .
#
# 运行(8 卡):
# docker run -d --name llama4-scout \
# --network host --ipc host \
# --device=/dev/iluvatar0 ... --device=/dev/iluvatar7 \
# -v /mnt/disk0/models/LLM-Research/Llama-4-Scout-17B-16E-Instruct:/models/llama4-scout:ro \
# --ulimit memlock=-1 --ulimit stack=67108864 \
# llama4-scout:2026-10-23
#
# 说明:
# - 不需要 --privileged;只需要 GPU 设备节点 + host IPC/network。
# - 如果厂商 runtime 要求整块 /dev,可用 -v /dev:/dev 代替 --device 列表。
# - 模型目录只读挂载,容器内不写模型。
FROM registry.iluvatar.com.cn:10443/customer/sz/vllm0.17.0-4.4.0-x86:v7
LABEL org.opencontainers.image.title="llama4-scout-bi150" \
org.opencontainers.image.description="Llama 4 Scout 17B-16E Instruct on Iluvatar BI-V150 with vLLM 0.17.0+corex" \
org.opencontainers.image.version="2026-10-23"
COPY apply_patch.py /opt/llama4/apply_patch.py
COPY entrypoint.sh /usr/local/bin/llama4-entrypoint.sh
COPY vllm_llama4_chunked_attn.patch /opt/llama4/vllm_llama4_chunked_attn.patch
RUN chmod +x /usr/local/bin/llama4-entrypoint.sh \
&& python3 /opt/llama4/apply_patch.py
ENV MODEL_PATH=/models/llama4-scout \
SERVED_NAME=llama4-scout \
HOST=0.0.0.0 \
PORT=8091 \
TP=8 \
MAX_MODEL_LEN=4096 \
MAX_NUM_SEQS=1 \
GPU_MEM_UTIL=0.90 \
PYTHONUNBUFFERED=1
WORKDIR /opt/llama4
EXPOSE 8091
ENTRYPOINT ["/usr/local/bin/llama4-entrypoint.sh"]