Commit 4cb28fdf authored by myhloli's avatar myhloli
Browse files

fix: update Dockerfile and README files to use updated mineru installation commands

parent f2ff3472
...@@ -482,7 +482,7 @@ There are three different ways to experience MinerU: ...@@ -482,7 +482,7 @@ There are three different ways to experience MinerU:
```bash ```bash
pip install --upgrade pip pip install --upgrade pip
pip install uv pip install uv
uv pip install "mineru[core]>=2.0.0" uv pip install -U "mineru[core]"
``` ```
#### 1.2 Install from source #### 1.2 Install from source
...@@ -493,19 +493,26 @@ cd MinerU ...@@ -493,19 +493,26 @@ cd MinerU
uv pip install -e .[core] uv pip install -e .[core]
``` ```
#### 1.3 Install full version (with sglang acceleration) #### 1.3 Install the Full Version (Supports sglang Acceleration)
To use **sglang acceleration for VLM model inference**, install the full version: If you need to use **sglang to accelerate VLM model inference**, you can choose any of the following methods to install the full version:
```bash - Install using uv or pip:
uv pip install "mineru[all]>=2.0.0" ```bash
``` uv pip install -U "mineru[all]"
```
Or install from source: - Install from source:
```bash
```bash uv pip install -e .[all]
uv pip install -e .[all] ```
``` - Build the Docker image:
```bash
wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/global/Dockerfile
docker build -t mineru-sglang:latest -f Dockerfile .
```
> [!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.
--- ---
...@@ -629,7 +636,8 @@ mineru-sglang-server --port 30000 ...@@ -629,7 +636,8 @@ mineru-sglang-server --port 30000
mineru -p <input_path> -o <output_path> -b vlm-sglang-client -u http://127.0.0.1:30000 mineru -p <input_path> -o <output_path> -b vlm-sglang-client -u http://127.0.0.1:30000
``` ```
> 💡 For more information about output files, please refer to [Output File Documentation](docs/output_file_en_us.md) > [!TIP]
> For more information about output files, please refer to [Output File Documentation](docs/output_file_en_us.md)
--- ---
......
...@@ -472,7 +472,7 @@ https://github.com/user-attachments/assets/4bea02c9-6d54-4cd6-97ed-dff14340982c ...@@ -472,7 +472,7 @@ https://github.com/user-attachments/assets/4bea02c9-6d54-4cd6-97ed-dff14340982c
```bash ```bash
pip install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple pip install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple
pip install uv -i https://mirrors.aliyun.com/pypi/simple pip install uv -i https://mirrors.aliyun.com/pypi/simple
uv pip install "mineru[core]>=2.0.0" -i https://mirrors.aliyun.com/pypi/simple uv pip install -U "mineru[core]" -i https://mirrors.aliyun.com/pypi/simple
``` ```
#### 1.2 源码安装 #### 1.2 源码安装
...@@ -485,17 +485,24 @@ uv pip install -e .[core] -i https://mirrors.aliyun.com/pypi/simple ...@@ -485,17 +485,24 @@ uv pip install -e .[core] -i https://mirrors.aliyun.com/pypi/simple
#### 1.3 安装完整版(支持 sglang 加速) #### 1.3 安装完整版(支持 sglang 加速)
如需使用 **sglang 加速 VLM 模型推理**,请安装完整版本: 如需使用 **sglang 加速 VLM 模型推理**,请选择合适的方式安装完整版本:
```bash - 使用uv或pip安装
uv pip install "mineru[all]>=2.0.0" -i https://mirrors.aliyun.com/pypi/simple ```bash
``` uv pip install -U "mineru[all]" -i https://mirrors.aliyun.com/pypi/simple
```
或从源码安装: - 从源码安装:
```bash
```bash uv pip install -e .[all] -i https://mirrors.aliyun.com/pypi/simple
uv pip install -e .[all] -i https://mirrors.aliyun.com/pypi/simple ```
``` - 使用 Dockerfile 构建镜像:
```bash
wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/china/Dockerfile
docker build -t mineru-sglang:latest -f Dockerfile .
```
> [!TIP]
> Dockerfile默认使用`lmsysorg/sglang:v0.4.7-cu124`作为基础镜像,如有需要,您可以自行修改为其他平台版本。
--- ---
...@@ -619,7 +626,8 @@ mineru-sglang-server --port 30000 ...@@ -619,7 +626,8 @@ mineru-sglang-server --port 30000
mineru -p <input_path> -o <output_path> -b vlm-sglang-client -u http://127.0.0.1:30000 mineru -p <input_path> -o <output_path> -b vlm-sglang-client -u http://127.0.0.1:30000
``` ```
> 💡 更多关于输出文件的信息,请参考 [输出文件说明](docs/output_file_zh_cn.md) > [!TIP]
> 更多关于输出文件的信息,请参考 [输出文件说明](docs/output_file_zh_cn.md)
--- ---
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
FROM lmsysorg/sglang:v0.4.7-cu124 FROM lmsysorg/sglang:v0.4.7-cu124
# install mineru latest # install mineru latest
RUN python3 -m pip install 'mineru[core]>=2.0.0' -i https://mirrors.aliyun.com/pypi/simple --break-system-packages RUN python3 -m pip install -U 'mineru[core]' -i https://mirrors.aliyun.com/pypi/simple --break-system-packages
# Download models and update the configuration file # Download models and update the configuration file
RUN /bin/bash -c "mineru-models-download -s modelscope -m all" RUN /bin/bash -c "mineru-models-download -s modelscope -m all"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
FROM lmsysorg/sglang:v0.4.7-cu124 FROM lmsysorg/sglang:v0.4.7-cu124
# install mineru latest # install mineru latest
RUN python3 -m pip install 'mineru[core]>=2.0.0' --break-system-packages RUN python3 -m pip install -U 'mineru[core]' --break-system-packages
# Download models and update the configuration file # Download models and update the configuration file
RUN /bin/bash -c "mineru-models-download -s huggingface -m all" RUN /bin/bash -c "mineru-models-download -s huggingface -m all"
......
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