Explorar el Código

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

myhloli hace 5 meses
padre
commit
4cb28fdf96
Se han modificado 4 ficheros con 46 adiciones y 30 borrados
  1. 23 15
      README.md
  2. 21 13
      README_zh-CN.md
  3. 1 1
      docker/china/Dockerfile
  4. 1 1
      docker/global/Dockerfile

+ 23 - 15
README.md

@@ -482,7 +482,7 @@ There are three different ways to experience MinerU:
 ```bash
 pip install --upgrade pip
 pip install uv
-uv pip install "mineru[core]>=2.0.0"
+uv pip install -U "mineru[core]"
 ```
 
 #### 1.2 Install from source
@@ -493,19 +493,26 @@ cd MinerU
 uv pip install -e .[core]
 ```
 
-#### 1.3 Install full version (with sglang acceleration)
-
-To use **sglang acceleration for VLM model inference**, install the full version:
-
-```bash
-uv pip install "mineru[all]>=2.0.0"
-```
-
-Or install from source:
-
-```bash
-uv pip install -e .[all]
-```
+#### 1.3 Install the Full Version (Supports sglang Acceleration)
+
+If you need to use **sglang to accelerate VLM model inference**, you can choose any of the following methods to install the full version:
+
+- Install using uv or pip:
+  ```bash
+  uv pip install -U "mineru[all]"
+  ```
+- Install from source:
+  ```bash
+  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
 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)
 
 ---
 

+ 21 - 13
README_zh-CN.md

@@ -472,7 +472,7 @@ https://github.com/user-attachments/assets/4bea02c9-6d54-4cd6-97ed-dff14340982c
 ```bash
 pip install --upgrade pip -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 源码安装
@@ -485,17 +485,24 @@ uv pip install -e .[core] -i https://mirrors.aliyun.com/pypi/simple
 
 #### 1.3 安装完整版(支持 sglang 加速)
 
-如需使用 **sglang 加速 VLM 模型推理**,请安装完整版本:
-
-```bash
-uv pip install "mineru[all]>=2.0.0" -i https://mirrors.aliyun.com/pypi/simple
-```
-
-或从源码安装:
-
-```bash
-uv pip install -e .[all] -i https://mirrors.aliyun.com/pypi/simple
-```
+如需使用 **sglang 加速 VLM 模型推理**,请选择合适的方式安装完整版本:
+
+- 使用uv或pip安装
+  ```bash
+  uv pip install -U "mineru[all]" -i https://mirrors.aliyun.com/pypi/simple
+  ```
+- 从源码安装:
+  ```bash
+  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
 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)
 
 ---
 

+ 1 - 1
docker/china/Dockerfile

@@ -2,7 +2,7 @@
 FROM lmsysorg/sglang:v0.4.7-cu124
 
 # 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
 RUN /bin/bash -c "mineru-models-download -s modelscope -m all"

+ 1 - 1
docker/global/Dockerfile

@@ -2,7 +2,7 @@
 FROM lmsysorg/sglang:v0.4.7-cu124
 
 # 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
 RUN /bin/bash -c "mineru-models-download -s huggingface -m all"