转载于抖音博主 大叔五哥,以下为转载内容
12月25日更新简易安装代码,感谢 Alex三水 分享的国内镜像源
services:
backend:
container_name: miloco-backend
image: ghcr.nju.edu.cn/xiaomi/miloco-backend:latest
# NOTICE: MUST be host for miot device discovery.
network_mode: host
expose:
- ${BACKEND_PORT:-9000}
environment:
- BACKEND_HOST=${BACKEND_HOST:-0.0.0.0}
- BACKEND_PORT=${BACKEND_PORT:-9000}
- AI_ENGINE_HOST=${AI_ENGINE_HOST:-0.0.0.0}
- AI_ENGINE_PORT=${AI_ENGINE_PORT:-9001}
- BACKEND_LOG_LEVEL=${BACKEND_LOG_LEVEL:-info}
- TZ=${TZ:-Asia/Shanghai}
volumes:
- ./data:/app/miloco_server/.temp
- ./log/backend:/app/miloco_server/.temp/log
# NOTICE: Mount configuration files, if you want to use your own configuration files, please mount them here.
# - ./config/server_config.yaml:/app/config/server_config.yaml
# - ./config/prompt_config.yaml:/app/config/prompt_config.yaml
restart: unless-stopped
healthcheck:
disable: true
含miloco完整yaml(2025/12/29修改)
services:
ai_engine:
container_name: miloco-ai_engine
image: ghcr.nju.edu.cn/xiaomi/miloco-ai_engine:latest
ports:
- ${AI_ENGINE_PORT:-8001}:${AI_ENGINE_PORT:-8001}
environment:
- AI_ENGINE_HOST=${AI_ENGINE_HOST:-0.0.0.0}
- AI_ENGINE_PORT=${AI_ENGINE_PORT:-8001}
- AI_ENGINE_LOG_LEVEL=${AI_ENGINE_LOG_LEVEL:-info}
- TZ=${TZ:-Asia/Shanghai}
volumes:
- ./models:/models
- ./log/ai_engine:/app/.log/ai_engine
# NOTICE: If you want to use your own configuration files or models path, please mount them here.
# - ./config/ai_engine_config.yaml:/app/config/ai_engine_config.yaml
# - ./config/prompt_config.yaml:/app/config/prompt_config.yaml
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
restart: unless-stopped
healthcheck:
disable: true
backend:
container_name: miloco-backend
image: ghcr.nju.edu.cn/xiaomi/miloco-backend:latest
# NOTICE: MUST be host for miot device discovery.
network_mode: host
expose:
- ${BACKEND_PORT:-8000}
environment:
- BACKEND_HOST=${BACKEND_HOST:-0.0.0.0}
- BACKEND_PORT=${BACKEND_PORT:-8000}
- AI_ENGINE_HOST=${AI_ENGINE_HOST:-0.0.0.0}
- AI_ENGINE_PORT=${AI_ENGINE_PORT:-8001}
- BACKEND_LOG_LEVEL=${BACKEND_LOG_LEVEL:-info}
- TZ=${TZ:-Asia/Shanghai}
volumes:
- ./data:/app/miloco_server/.temp
- ./log/backend:/app/miloco_server/.temp/log
# NOTICE: Mount configuration files, if you want to use your own configuration files, please mount them here.
# - ./config/server_config.yaml:/app/config/server_config.yaml
# - ./config/prompt_config.yaml:/app/config/prompt_config.yaml
restart: unless-stopped
healthcheck:
disable: true
环境变量
################################################
# Common configuration.
################################################
TZ=Asia/Shanghai
DOCKER_REPO=ghcr.io/
################################################
# Backend configuration.
################################################
# Backend host.
BACKEND_HOST=0.0.0.0
# Backend port.
BACKEND_PORT=8000
# Log level: debug, info, warning, error, critical.
BACKEND_LOG_LEVEL=info
################################################
# AI engine configuration.
################################################
# AI engine host.
AI_ENGINE_HOST=0.0.0.0
# AI engine port.
AI_ENGINE_PORT=8001
# Log level: debug, info, warning, error, critical.
AI_ENGINE_LOG_LEVEL=info