Files
mineru-rocm/docker/docker-compose.yml
T
2026-06-09 17:49:59 +08:00

99 lines
2.8 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.
# =============================================================================
# MinerU ROCm Docker Compose 配置
# 原生 Linux + AMD GPU 环境
# =============================================================================
services:
# --- CLI 模式(默认)---
mineru:
image: mineru-rocm:7.2.1
build:
context: .
dockerfile: Dockerfile
network: host
args:
ARCH: gfx1201
GIT_PROXY: http://127.0.0.1:8118
profiles: ["cli"]
container_name: mineru-rocm
stdin_open: true
tty: true
ipc: host
devices:
- /dev/kfd
- /dev/dri
security_opt:
- seccomp=unconfined
group_add:
- video
- render
environment:
- MINERU_MODEL_SOURCE=${MINERU_MODEL_SOURCE:-huggingface}
- HF_HUB_CACHE=${HF_HUB_CACHE:-/opt/models/huggingface}
- MODELSCOPE_CACHE=${MODELSCOPE_CACHE:-/opt/models/modelscope}
volumes:
- ${INPUT_DIR:-./data/input}:/data/input:ro
- ${OUTPUT_DIR:-./data/output}:/data/output
- ${MODEL_DIR:-./data/models}:/opt/models
- ${MIOPEN_CACHE:-./data/miopen}:/root/.cache/miopen
command: bash
restart: "no"
# --- WebUI(Gradio)---
gradio:
image: mineru-rocm:7.2.1
profiles: ["webui"]
container_name: mineru-gradio
stdin_open: true
tty: true
ipc: host
ports:
- "7860:7860"
devices:
- /dev/kfd
- /dev/dri
security_opt:
- seccomp=unconfined
group_add:
- video
- render
environment:
- MINERU_MODEL_SOURCE=${MINERU_MODEL_SOURCE:-huggingface}
- HF_HUB_CACHE=${HF_HUB_CACHE:-/opt/models/huggingface}
- MODELSCOPE_CACHE=${MODELSCOPE_CACHE:-/opt/models/modelscope}
volumes:
- ${INPUT_DIR:-./data/input}:/data/input:ro
- ${OUTPUT_DIR:-./data/output}:/data/output
- ${MODEL_DIR:-./data/models}:/opt/models
- ${MIOPEN_CACHE:-./data/miopen}:/root/.cache/miopen
command: mineru-gradio --server-name 0.0.0.0 --server-port 7860
# --- API 服务 ---
api:
image: mineru-rocm:7.2.1
profiles: ["api"]
container_name: mineru-api
stdin_open: true
tty: true
ipc: host
ports:
- "8000:8000"
devices:
- /dev/kfd
- /dev/dri
security_opt:
- seccomp=unconfined
group_add:
- video
- render
environment:
- MINERU_MODEL_SOURCE=${MINERU_MODEL_SOURCE:-huggingface}
- HF_HUB_CACHE=${HF_HUB_CACHE:-/opt/models/huggingface}
- MODELSCOPE_CACHE=${MODELSCOPE_CACHE:-/opt/models/modelscope}
volumes:
- ${INPUT_DIR:-./data/input}:/data/input:ro
- ${OUTPUT_DIR:-./data/output}:/data/output
- ${MODEL_DIR:-./data/models}:/opt/models
- ${MIOPEN_CACHE:-./data/miopen}:/root/.cache/miopen
command: mineru-api --host 0.0.0.0 --port 8000