|
@@ -13,6 +13,8 @@ docker build -t mineru-sglang:latest -f Dockerfile .
|
|
|
> The [Dockerfile](https://github.com/opendatalab/MinerU/blob/master/docker/global/Dockerfile) uses `lmsysorg/sglang:v0.4.8.post1-cu126` as the base image by default, supporting Turing/Ampere/Ada Lovelace/Hopper platforms.
|
|
> The [Dockerfile](https://github.com/opendatalab/MinerU/blob/master/docker/global/Dockerfile) uses `lmsysorg/sglang:v0.4.8.post1-cu126` as the base image by default, supporting Turing/Ampere/Ada Lovelace/Hopper platforms.
|
|
|
> If you are using the newer `Blackwell` platform, please modify the base image to `lmsysorg/sglang:v0.4.8.post1-cu128-b200` before executing the build operation.
|
|
> If you are using the newer `Blackwell` platform, please modify the base image to `lmsysorg/sglang:v0.4.8.post1-cu128-b200` before executing the build operation.
|
|
|
|
|
|
|
|
|
|
+---
|
|
|
|
|
+
|
|
|
## Docker Description
|
|
## Docker Description
|
|
|
|
|
|
|
|
MinerU's Docker uses `lmsysorg/sglang` as the base image, so it includes the `sglang` inference acceleration framework and necessary dependencies by default. Therefore, on compatible devices, you can directly use `sglang` to accelerate VLM model inference.
|
|
MinerU's Docker uses `lmsysorg/sglang` as the base image, so it includes the `sglang` inference acceleration framework and necessary dependencies by default. Therefore, on compatible devices, you can directly use `sglang` to accelerate VLM model inference.
|
|
@@ -26,6 +28,8 @@ MinerU's Docker uses `lmsysorg/sglang` as the base image, so it includes the `sg
|
|
|
>
|
|
>
|
|
|
> If your device doesn't meet the above requirements, you can still use other features of MinerU, but cannot use `sglang` to accelerate VLM model inference, meaning you cannot use the `vlm-sglang-engine` backend or start the `vlm-sglang-server` service.
|
|
> If your device doesn't meet the above requirements, you can still use other features of MinerU, but cannot use `sglang` to accelerate VLM model inference, meaning you cannot use the `vlm-sglang-engine` backend or start the `vlm-sglang-server` service.
|
|
|
|
|
|
|
|
|
|
+---
|
|
|
|
|
+
|
|
|
## Start Docker Container:
|
|
## Start Docker Container:
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
@@ -40,6 +44,8 @@ docker run --gpus all \
|
|
|
After executing this command, you will enter the Docker container's interactive terminal with some ports mapped for potential services. You can directly run MinerU-related commands within the container to use MinerU's features.
|
|
After executing this command, you will enter the Docker container's interactive terminal with some ports mapped for potential services. You can directly run MinerU-related commands within the container to use MinerU's features.
|
|
|
You can also directly start MinerU services by replacing `/bin/bash` with service startup commands. For detailed instructions, please refer to the [MinerU Usage Documentation](../usage/index.md).
|
|
You can also directly start MinerU services by replacing `/bin/bash` with service startup commands. For detailed instructions, please refer to the [MinerU Usage Documentation](../usage/index.md).
|
|
|
|
|
|
|
|
|
|
+---
|
|
|
|
|
+
|
|
|
## Start Services Directly with Docker Compose
|
|
## Start Services Directly with Docker Compose
|
|
|
|
|
|
|
|
We provide a [compose.yaml](https://github.com/opendatalab/MinerU/blob/master/docker/compose.yaml) file that you can use to quickly start MinerU services.
|
|
We provide a [compose.yaml](https://github.com/opendatalab/MinerU/blob/master/docker/compose.yaml) file that you can use to quickly start MinerU services.
|
|
@@ -55,7 +61,8 @@ wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/compose.yaml
|
|
|
>- Different services might have additional parameter configurations, which you can view and edit in the `compose.yaml` file.
|
|
>- Different services might have additional parameter configurations, which you can view and edit in the `compose.yaml` file.
|
|
|
>- Due to the pre-allocation of GPU memory by the `sglang` inference acceleration framework, you may not be able to run multiple `sglang` services simultaneously on the same machine. Therefore, ensure that other services that might use GPU memory have been stopped before starting the `vlm-sglang-server` service or using the `vlm-sglang-engine` backend.
|
|
>- Due to the pre-allocation of GPU memory by the `sglang` inference acceleration framework, you may not be able to run multiple `sglang` services simultaneously on the same machine. Therefore, ensure that other services that might use GPU memory have been stopped before starting the `vlm-sglang-server` service or using the `vlm-sglang-engine` backend.
|
|
|
|
|
|
|
|
-- Start `sglang-server` service and connect to `sglang-server` via `vlm-sglang-client` backend:
|
|
|
|
|
|
|
+### Start sglang-server service
|
|
|
|
|
+connect to `sglang-server` via `vlm-sglang-client` backend
|
|
|
```bash
|
|
```bash
|
|
|
docker compose -f compose.yaml --profile mineru-sglang-server up -d
|
|
docker compose -f compose.yaml --profile mineru-sglang-server up -d
|
|
|
```
|
|
```
|
|
@@ -65,14 +72,14 @@ wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/compose.yaml
|
|
|
> mineru -p <input_path> -o <output_path> -b vlm-sglang-client -u http://<server_ip>:30000
|
|
> mineru -p <input_path> -o <output_path> -b vlm-sglang-client -u http://<server_ip>:30000
|
|
|
> ```
|
|
> ```
|
|
|
|
|
|
|
|
-- Start API service:
|
|
|
|
|
|
|
+### Start Web API service
|
|
|
```bash
|
|
```bash
|
|
|
docker compose -f compose.yaml --profile mineru-api up -d
|
|
docker compose -f compose.yaml --profile mineru-api up -d
|
|
|
```
|
|
```
|
|
|
>[!TIP]
|
|
>[!TIP]
|
|
|
>Access `http://<server_ip>:8000/docs` in your browser to view the API documentation.
|
|
>Access `http://<server_ip>:8000/docs` in your browser to view the API documentation.
|
|
|
|
|
|
|
|
-- Start Gradio WebUI service:
|
|
|
|
|
|
|
+### Start Gradio WebUI service
|
|
|
```bash
|
|
```bash
|
|
|
docker compose -f compose.yaml --profile mineru-gradio up -d
|
|
docker compose -f compose.yaml --profile mineru-gradio up -d
|
|
|
```
|
|
```
|