Files
llama-4-bi150/docker-compose.yml
xiejiahao daaf85f4e5 Switch to bridge networking with fixed container port 80 and served name llm
- run.sh: bridge + -p ${HOST_PORT:-24396}:80, health check uses host port
- entrypoint.sh: PORT defaults to 80, SERVED_NAME defaults to llm
  detected port/served name become log hints only
- verify.sh: read host port from port bindings, expect model name llm
- docker-compose.yml: ports mapping instead of network_mode host
- README: update tables, commands and rationale
2026-10-28 14:19:42 +08:00

59 lines
1.7 KiB
YAML
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.

services:
llama4:
build:
context: .
dockerfile: Dockerfile
image: llama4-bi150:${TAG:-2026-10-26}
container_name: llama4
# 镜像本身不设置启动命令,启动方式全部由这里决定。
entrypoint: ["/usr/local/bin/llama4-entrypoint.sh"]
working_dir: /opt/llama4
# 容器内固定监听 80,宿主机端口由 HOST_PORT 决定(默认 24396)。
expose:
- "80"
ports:
- "${HOST_PORT:-24396}:80"
# bridge 网络 + 端口映射;ipc host 供 vLLM/PyTorch 多卡共享内存。
ipc: host
# Iluvatar 运行时要求
privileged: true
pid: host
volumes:
- /dev:/dev
- ${MODEL_HOST_DIR:-/mnt/disk0/models/LLM-Research/Llama-4-Scout-17B-16E-Instruct}:/models/llama4:ro
environment:
MODEL_PATH: /models/llama4
AUTO_DETECT: "${AUTO_DETECT:-1}"
HOST: "${HOST:-0.0.0.0}"
# 默认暴露全部 16 张卡;entrypoint 会根据模型选择实际 TP*PP。
CUDA_VISIBLE_DEVICES: "${GPUS:-0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}"
# 容器内端口固定 80,模型名固定 llm(AGENTS.md 5.2 / 5.5)。
PORT: "80"
SERVED_NAME: "${SERVED_NAME:-llm}"
# 留空时由 entrypoint 根据 config.json 自动判断。
# 需要手动覆盖时直接设置同名环境变量即可。
TP: "${TP:-}"
PP: "${PP:-}"
MAX_MODEL_LEN: "${MAX_MODEL_LEN:-4096}"
MAX_NUM_SEQS: "${MAX_NUM_SEQS:-1}"
GPU_MEM_UTIL: "${GPU_MEM_UTIL:-0.90}"
ENFORCE_EAGER: "${ENFORCE_EAGER:-1}"
PYTHONUNBUFFERED: "1"
EXTRA_ARGS: "${EXTRA_ARGS:-}"
ulimits:
memlock: -1
stack: 67108864
restart: unless-stopped