Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

feat: add Docker Compose configuration and update README for container startup

myhloli55cb4c90649a
diff --git a/README.md b/README.md
index fdbf5e26..867dc3ab 100644
--- a/README.md
+++ b/README.md
@@ -509,10 +509,13 @@ If you need to use **sglang to accelerate VLM model inference**, you can choose
```bash
uv pip install -e .[all]
```
-- Build the Docker image:
+- Build image using Dockerfile:
```bash
wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/global/Dockerfile
docker build -t mineru-sglang:latest -f Dockerfile .
+ ```
+ Start Docker container:
+ ```bash
docker run --gpus all \
--shm-size 32g \
-p 30000:30000 \
@@ -520,6 +523,11 @@ If you need to use **sglang to accelerate VLM model inference**, you can choose
mineru-sglang:latest \
mineru-sglang-server --host 0.0.0.0 --port 30000
```
+ Or start using Docker Compose:
+ ```bash
+ wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/compose.yaml
+ docker compose -f compose.yaml up -d
+ ```
> [!TIP]
> The Dockerfile uses `lmsysorg/sglang:v0.4.7-cu124` as the default base image. If necessary, you can modify it to another platform version.
diff --git a/README_zh-CN.md b/README_zh-CN.md
index 8f4a9924..e27b2b4d 100644
--- a/README_zh-CN.md
+++ b/README_zh-CN.md
@@ -503,6 +503,9 @@ uv pip install -e .[core] -i https://mirrors.aliyun.com/pypi/simple
```bash
wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/china/Dockerfile
docker build -t mineru-sglang:latest -f Dockerfile .
+ ```
+ 启动 Docker 容器:
+ ```bash
docker run --gpus all \
--shm-size 32g \
-p 30000:30000 \
@@ -510,6 +513,11 @@ uv pip install -e .[core] -i https://mirrors.aliyun.com/pypi/simple
mineru-sglang:latest \
mineru-sglang-server --host 0.0.0.0 --port 30000
```
+ 或使用 Docker Compose 启动:
+ ```bash
+ wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/compose.yaml
+ docker compose -f compose.yaml up -d
+ ```
> [!TIP]
> Dockerfile默认使用`lmsysorg/sglang:v0.4.7-cu124`作为基础镜像,如有需要,您可以自行修改为其他平台版本。
diff --git a/docker/compose.yaml b/docker/compose.yaml
new file mode 100644
index 00000000..afc2dc15
--- /dev/null
+++ b/docker/compose.yaml
@@ -0,0 +1,26 @@
+services:
+ mineru-sglang:
+ image: mineru-sglang:latest
+ container_name: mineru-sglang
+ restart: always
+ ports:
+ - 30000:30000
+ environment:
+ MINERU_MODEL_SOURCE: local
+ entrypoint: mineru-sglang-server
+ command:
+ --host 0.0.0.0
+ --port 30000
+ ulimits:
+ memlock: -1
+ stack: 67108864
+ ipc: host
+ healthcheck:
+ test: ["CMD-SHELL", "curl -f http://localhost:30000/health || exit 1"]
+ deploy:
+ resources:
+ reservations:
+ devices:
+ - driver: nvidia
+ device_ids: ["0"]
+ capabilities: [gpu]
\ No newline at end of file