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
This commit is contained in:
2026-10-28 14:19:42 +08:00
parent 31994d940f
commit daaf85f4e5
5 changed files with 120 additions and 57 deletions

View File

@@ -9,12 +9,14 @@ services:
# 镜像本身不设置启动命令,启动方式全部由这里决定。
entrypoint: ["/usr/local/bin/llama4-entrypoint.sh"]
working_dir: /opt/llama4
expose:
- "8091"
- "8092"
# vLLM 多卡 NCCL / 端口直通
network_mode: host
# 容器内固定监听 80,宿主机端口由 HOST_PORT 决定(默认 24396)。
expose:
- "80"
ports:
- "${HOST_PORT:-24396}:80"
# bridge 网络 + 端口映射;ipc host 供 vLLM/PyTorch 多卡共享内存。
ipc: host
# Iluvatar 运行时要求
@@ -33,12 +35,14 @@ services:
# 默认暴露全部 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:-}"
PORT: "${PORT:-}"
SERVED_NAME: "${SERVED_NAME:-}"
MAX_MODEL_LEN: "${MAX_MODEL_LEN:-4096}"
MAX_NUM_SEQS: "${MAX_NUM_SEQS:-1}"