Commit 55cb4c90 authored by myhloli's avatar myhloli
Browse files

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

parent f51c1acc
...@@ -509,10 +509,13 @@ If you need to use **sglang to accelerate VLM model inference**, you can choose ...@@ -509,10 +509,13 @@ If you need to use **sglang to accelerate VLM model inference**, you can choose
```bash ```bash
uv pip install -e .[all] uv pip install -e .[all]
``` ```
- Build the Docker image: - Build image using Dockerfile:
```bash ```bash
wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/global/Dockerfile wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/global/Dockerfile
docker build -t mineru-sglang:latest -f Dockerfile . docker build -t mineru-sglang:latest -f Dockerfile .
```
Start Docker container:
```bash
docker run --gpus all \ docker run --gpus all \
--shm-size 32g \ --shm-size 32g \
-p 30000:30000 \ -p 30000:30000 \
...@@ -520,6 +523,11 @@ If you need to use **sglang to accelerate VLM model inference**, you can choose ...@@ -520,6 +523,11 @@ If you need to use **sglang to accelerate VLM model inference**, you can choose
mineru-sglang:latest \ mineru-sglang:latest \
mineru-sglang-server --host 0.0.0.0 --port 30000 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] > [!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. > The Dockerfile uses `lmsysorg/sglang:v0.4.7-cu124` as the default base image. If necessary, you can modify it to another platform version.
......
...@@ -503,6 +503,9 @@ uv pip install -e .[core] -i https://mirrors.aliyun.com/pypi/simple ...@@ -503,6 +503,9 @@ uv pip install -e .[core] -i https://mirrors.aliyun.com/pypi/simple
```bash ```bash
wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/china/Dockerfile wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/china/Dockerfile
docker build -t mineru-sglang:latest -f Dockerfile . docker build -t mineru-sglang:latest -f Dockerfile .
```
启动 Docker 容器:
```bash
docker run --gpus all \ docker run --gpus all \
--shm-size 32g \ --shm-size 32g \
-p 30000:30000 \ -p 30000:30000 \
...@@ -510,6 +513,11 @@ uv pip install -e .[core] -i https://mirrors.aliyun.com/pypi/simple ...@@ -510,6 +513,11 @@ uv pip install -e .[core] -i https://mirrors.aliyun.com/pypi/simple
mineru-sglang:latest \ mineru-sglang:latest \
mineru-sglang-server --host 0.0.0.0 --port 30000 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] > [!TIP]
> Dockerfile默认使用`lmsysorg/sglang:v0.4.7-cu124`作为基础镜像,如有需要,您可以自行修改为其他平台版本。 > Dockerfile默认使用`lmsysorg/sglang:v0.4.7-cu124`作为基础镜像,如有需要,您可以自行修改为其他平台版本。
......
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment