Files
gemma4-bi150/docker-compose.yml
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

58 lines
1.6 KiB
YAML
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.

services:
gemma4:
build:
context: .
dockerfile: Dockerfile
image: gemma4-bi150:${TAG:-2026-10-27}
container_name: gemma4
# 镜像本身不设置启动命令,启动方式全部由这里决定。
entrypoint: ["/usr/local/bin/gemma4-entrypoint.sh"]
working_dir: /opt/gemma4
expose:
- "8094"
- "8095"
# vLLM 多卡 NCCL / 端口直通
network_mode: host
ipc: host
# Iluvatar 运行时需要 privileged + /dev 绑定。
# 只给 --device=/dev/iluvatar* 会在 worker init 时报
# cudaGetDeviceCount() ... Error 1001
privileged: true
pid: host
volumes:
- /dev:/dev
- ${MODEL_HOST_DIR:-/mnt/disk0/models/google/gemma-4-31B-it}:/models/gemma4:ro
environment:
MODEL_PATH: /models/gemma4
AUTO_DETECT: "${AUTO_DETECT:-1}"
HOST: "${HOST:-0.0.0.0}"
# 默认给 4 张(Gemma-4-31B 的 TP4);GEV 只需要 2 张,
# entrypoint 按检测出的 TP 使用前 TP 张。
CUDA_VISIBLE_DEVICES: "${GPUS:-15,14,13,12}"
# 留空时由 entrypoint 根据 config.json 自动判断。
# 需要手动覆盖时直接设置同名环境变量即可。
TP: "${TP:-}"
PORT: "${PORT:-}"
SERVED_NAME: "${SERVED_NAME:-}"
MAX_NUM_SEQS: "${MAX_NUM_SEQS:-}"
GPU_MEM_UTIL: "${GPU_MEM_UTIL:-}"
ENFORCE_EAGER: "${ENFORCE_EAGER:-}"
MAX_MODEL_LEN: "${MAX_MODEL_LEN:-8192}"
MAX_IMAGES: "${MAX_IMAGES:-4}"
PYTHONUNBUFFERED: "1"
EXTRA_ARGS: "${EXTRA_ARGS:-}"
ulimits:
memlock: -1
stack: 67108864
restart: unless-stopped