mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2025-12-04 02:46:08 +00:00
update docs (#17205)
* update docs * update * update * update * update * update * update
This commit is contained in:
parent
c3ed7869a7
commit
db13031b45
@ -4,7 +4,7 @@ comments: true
|
||||
|
||||
# PaddleOCR-VL DCU Environment Configuration Tutorial
|
||||
|
||||
This tutorial is a guide for configuring the PaddleOCR-VL DCU environment. The purpose is to complete the relevant environment setup. After the environment configuration is complete, please refer to the [PaddleOCR-VL Usage Tutorial](./PaddleOCR-VL.en.md) to use PaddleOCR-VL.
|
||||
This tutorial is a guide for configuring the PaddleOCR-VL HYGON DCU environment. The purpose is to complete the relevant environment setup. After the environment configuration is complete, please refer to the [PaddleOCR-VL Usage Tutorial](./PaddleOCR-VL.en.md) to use PaddleOCR-VL.
|
||||
|
||||
## 1. Environment Preparation
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ comments: true
|
||||
|
||||
# PaddleOCR-VL DCU 环境配置教程
|
||||
|
||||
本教程是 PaddleOCR-VL DCU 的环境配置教程,目的是完成相关的环境配置,环境配置完毕后请参考 [PaddleOCR-VL 使用教程](./PaddleOCR-VL.md) 使用 PaddleOCR-VL。
|
||||
本教程是 PaddleOCR-VL 海光 DCU 的环境配置教程,目的是完成相关的环境配置,环境配置完毕后请参考 [PaddleOCR-VL 使用教程](./PaddleOCR-VL.md) 使用 PaddleOCR-VL。
|
||||
|
||||
## 1. 环境准备
|
||||
|
||||
|
||||
@ -6,6 +6,14 @@ comments: true
|
||||
|
||||
This tutorial provides guidance on configuring the environment for NVIDIA Blackwell-architecture GPUs. After completing the environment setup, please refer to the [PaddleOCR-VL Usage Tutorial](./PaddleOCR-VL.en.md) to use PaddleOCR-VL.
|
||||
|
||||
NVIDIA Blackwell-architecture GPUs include, but are not limited to:
|
||||
|
||||
- RTX 5090
|
||||
- RTX 5080
|
||||
- RTX 5070、RTX 5070 Ti
|
||||
- RTX 5060、RTX 5060 Ti
|
||||
- RTX 5050
|
||||
|
||||
Before starting the tutorial, **please ensure that your NVIDIA driver supports CUDA 12.9 or higher**.
|
||||
|
||||
## 1. Environment Preparation
|
||||
@ -179,68 +187,16 @@ Please note that the PaddleOCR-VL service introduced in this section differs fro
|
||||
paddleocr-vl-api | INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
|
||||
```
|
||||
|
||||
### 4.2 Method 2: Manually Install Dependencies for Deployment
|
||||
This method accelerates VLM inference using the vLLM framework and is more suitable for production environment deployment.
|
||||
|
||||
Execute the following command to install the service deployment plugin via the PaddleX CLI:
|
||||
|
||||
```shell
|
||||
paddlex --install serving
|
||||
```
|
||||
|
||||
Then, start the server using the PaddleX CLI:
|
||||
|
||||
```shell
|
||||
paddlex --serve --pipeline PaddleOCR-VL
|
||||
```
|
||||
|
||||
After startup, you will see output similar to the following, with the server listening on port **8080** by default:
|
||||
|
||||
```text
|
||||
INFO: Started server process [63108]
|
||||
INFO: Waiting for application startup.
|
||||
INFO: Application startup complete.
|
||||
INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
|
||||
```
|
||||
|
||||
The command-line parameters related to service deployment are as follows:
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>--pipeline</code></td>
|
||||
<td>Registered name of the PaddleX pipeline or path to the pipeline configuration file.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--device</code></td>
|
||||
<td>Device for pipeline deployment. By default, GPU is used if available; otherwise, CPU is used.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--host</code></td>
|
||||
<td>Hostname or IP address to which the server is bound. Defaults to <code>0.0.0.0</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--port</code></td>
|
||||
<td>Port number on which the server listens. Defaults to <code>8080</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--use_hpip</code></td>
|
||||
<td>Enable high-performance inference mode. Refer to the high-performance inference documentation for more information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--hpi_config</code></td>
|
||||
<td>High-performance inference configuration. Refer to the high-performance inference documentation for more information.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
Additionally, after starting the server in this manner, no internet connection is required except for image pulling. For deployment in an offline environment, you can first pull the images involved in the Compose file on a connected machine, export them, and transfer them to the offline machine for import to start the service in an offline environment.
|
||||
|
||||
To adjust pipeline-related configurations (such as model paths, batch sizes, deployment devices, etc.), refer to Section 4.4.
|
||||
|
||||
### 4.2 Method 2: Manually Install Dependencies for Deployment
|
||||
|
||||
Please refer to the corresponding section in the [PaddleOCR-VL Usage Tutorial](./PaddleOCR-VL.en.md).
|
||||
|
||||
### 4.3 Client Invocation Methods
|
||||
|
||||
Please refer to the corresponding section in the [PaddleOCR-VL Usage Tutorial](./PaddleOCR-VL.en.md).
|
||||
|
||||
@ -6,6 +6,14 @@ comments: true
|
||||
|
||||
本教程是 NVIDIA Blackwell 架构 GPU 的环境配置教程,目的是完成相关的环境配置,环境配置完毕后请参考 [PaddleOCR-VL 使用教程](./PaddleOCR-VL.md) 使用 PaddleOCR-VL。
|
||||
|
||||
NVIDIA Blackwell 架构 GPU 包括但不限于以下几种:
|
||||
|
||||
- RTX 5090
|
||||
- RTX 5080
|
||||
- RTX 5070、RTX 5070 Ti
|
||||
- RTX 5060、RTX 5060 Ti
|
||||
- RTX 5050
|
||||
|
||||
教程开始前,**请确认您的 NVIDIA 驱动支持 CUDA 12.9 或以上版本**。
|
||||
|
||||
## 1. 环境准备
|
||||
@ -180,68 +188,16 @@ paddleocr genai_server --model_name PaddleOCR-VL-0.9B --backend vllm --port 8118
|
||||
paddleocr-vl-api | INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
|
||||
```
|
||||
|
||||
### 4.2 方法二:手动安装依赖部署
|
||||
此方式基于 vLLM 框架对 VLM 推理进行加速,更适合生产环境部署。
|
||||
|
||||
执行以下命令,通过 PaddleX CLI 安装服务化部署插件:
|
||||
|
||||
```shell
|
||||
paddlex --install serving
|
||||
```
|
||||
|
||||
然后,使用 PaddleX CLI 启动服务器:
|
||||
|
||||
```shell
|
||||
paddlex --serve --pipeline PaddleOCR-VL
|
||||
```
|
||||
|
||||
启动后将看到类似如下输出,服务器默认监听 **8080** 端口:
|
||||
|
||||
```text
|
||||
INFO: Started server process [63108]
|
||||
INFO: Waiting for application startup.
|
||||
INFO: Application startup complete.
|
||||
INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
|
||||
```
|
||||
|
||||
与服务化部署相关的命令行参数如下:
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>名称</th>
|
||||
<th>说明</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>--pipeline</code></td>
|
||||
<td>PaddleX 产线注册名或产线配置文件路径。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--device</code></td>
|
||||
<td>产线部署设备。默认情况下,若 GPU 可用则使用 GPU,否则使用 CPU。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--host</code></td>
|
||||
<td>服务器绑定的主机名或 IP 地址,默认为 <code>0.0.0.0</code>。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--port</code></td>
|
||||
<td>服务器监听的端口号,默认为 <code>8080</code>。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--use_hpip</code></td>
|
||||
<td>启用高性能推理模式。请参考高性能推理文档了解更多信息。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--hpi_config</code></td>
|
||||
<td>高性能推理配置。请参考高性能推理文档了解更多信息。</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
此外,使用此方式启动服务器后,除拉取镜像外,无需连接互联网。如需在离线环境中部署,可先在联网机器上拉取 Compose 文件中涉及的镜像,导出并传输至离线机器中导入,即可在离线环境下启动服务。
|
||||
|
||||
如需调整产线相关配置(如模型路径、批处理大小、部署设备等),可参考 4.4 小节。
|
||||
|
||||
### 4.2 方法二:手动安装依赖部署
|
||||
|
||||
请参考[PaddleOCR-VL 使用教程](./PaddleOCR-VL.md) 相同章节。
|
||||
|
||||
### 4.3 客户端调用方式
|
||||
|
||||
请参考[PaddleOCR-VL 使用教程](./PaddleOCR-VL.md) 相同章节。
|
||||
|
||||
@ -4,7 +4,7 @@ comments: true
|
||||
|
||||
# PaddleOCR-VL XPU Environment Configuration Tutorial
|
||||
|
||||
This tutorial is a guide for configuring the environment for PaddleOCR-VL XPU. After completing the environment setup, please refer to the [PaddleOCR-VL Usage Tutorial](./PaddleOCR-VL.en.md) to use PaddleOCR-VL.
|
||||
This tutorial is a guide for configuring the environment for PaddleOCR-VL KUNLUNXIN XPU. After completing the environment setup, please refer to the [PaddleOCR-VL Usage Tutorial](./PaddleOCR-VL.en.md) to use PaddleOCR-VL.
|
||||
|
||||
## 1. Environment Preparation
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ comments: true
|
||||
|
||||
# PaddleOCR-VL XPU 环境配置教程
|
||||
|
||||
本教程是 PaddleOCR-VL XPU 的环境配置教程,目的是完成相关的环境配置,环境配置完毕后请参考 [PaddleOCR-VL 使用教程](./PaddleOCR-VL.md) 使用 PaddleOCR-VL。
|
||||
本教程是 PaddleOCR-VL 昆仑芯 XPU 的环境配置教程,目的是完成相关的环境配置,环境配置完毕后请参考 [PaddleOCR-VL 使用教程](./PaddleOCR-VL.md) 使用 PaddleOCR-VL。
|
||||
|
||||
## 1. 环境准备
|
||||
|
||||
|
||||
@ -16,69 +16,64 @@ Currently, PaddleOCR-VL offers four inference methods, with varying levels of su
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Inference Method</th>
|
||||
<th>x64 CPU</th>
|
||||
<th>DCU</th>
|
||||
<th>XPU</th>
|
||||
<th>NVIDIA GPU</th>
|
||||
<th>KUNLUNXIN XPU</th>
|
||||
<th>HYGON DCU</th>
|
||||
<th>MetaX GPU</th>
|
||||
<th>Iluvatar GPU</th>
|
||||
<th>NVIDIA GPU</th>
|
||||
<th>x64 CPU</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<tr style="text-align: center;">
|
||||
<td>PaddlePaddle</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>
|
||||
<li>GPU Compute Capability ≥ 7</li>
|
||||
<li>CUDA version ≥ 11.8</li>
|
||||
</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr style="text-align: center;">
|
||||
<td>vLLM</td>
|
||||
<td>❌</td>
|
||||
<td>✅</td>
|
||||
<td>🚧</td>
|
||||
<td>✅</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>
|
||||
<li>GPU Compute Capability ≥ 8 (RTX 3060, RTX 5070, A10, A100, ...)</li><br />
|
||||
<li>CUDA version ≥ 12.6</li><br />
|
||||
Note: Devices with 7 ≤ GPU Compute Capability < 8 (T4, V100, ...) can run but may experience request timeouts, OOM errors, or other anomalies. Use is not recommended.
|
||||
</td>
|
||||
<td>❌</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr style="text-align: center;">
|
||||
<td>SGLang</td>
|
||||
<td>❌</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>
|
||||
<li>8 ≤ GPU Compute Capability < 12</li>
|
||||
<li>CUDA version ≥ 12.6</li>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>FastDeploy</td>
|
||||
<td>❌</td>
|
||||
<td>🚧</td>
|
||||
<td>✅</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>
|
||||
<li>8 ≤ GPU Compute Capability < 12</li>
|
||||
<li>CUDA version ≥ 12.6</li>
|
||||
</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>❌</td>
|
||||
</tr>
|
||||
<tr style="text-align: center;">
|
||||
<td>FastDeploy</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>❌</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
> Currently, PaddleOCR-VL does not support ARM architecture CPUs. Additional hardware support will be added based on actual demand in the future. Stay tuned!
|
||||
> vLLM, SGLang, and FastDeploy cannot run natively on Windows or macOS. Please use our provided Docker images instead.
|
||||
> **Notes**:
|
||||
> 1. When using NVIDIA GPU for inference, ensure that the Compute Capability (CC) and CUDA version meet the requirements:
|
||||
> - PaddlePaddle: CC ≥ 7.0, CUDA ≥ 11.8
|
||||
> - vLLM: CC ≥ 8.0, CUDA ≥ 12.6
|
||||
> - SGLang: 8.0 ≤ CC < 12.0, CUDA ≥ 12.6
|
||||
> - FastDeploy: 8.0 ≤ CC < 12.0, CUDA ≥ 12.6
|
||||
> - Common GPUs with CC ≥ 8 include RTX 30/40/50 series and A10/A100, etc. For more models, refer to [CUDA GPU Compute Capability](https://developer.nvidia.com/cuda-gpus)
|
||||
> 2. vLLM compatibility note: Although vLLM can be launched on NVIDIA GPUs with CC 7.x such as T4/V100, timeout or OOM issues may occur, and its use is not recommended.
|
||||
> 3. Currently, PaddleOCR-VL does not support ARM architecture CPUs. More hardware support will be expanded based on actual needs in the future, so stay tuned!
|
||||
> 4. vLLM, SGLang, and FastDeploy cannot run natively on Windows or macOS. Please use the Docker images we provide.
|
||||
|
||||
Since different hardware requires different dependencies, if your hardware meets the requirements in the table above, please refer to the following table for the corresponding tutorial to configure your environment:
|
||||
|
||||
@ -102,11 +97,11 @@ Since different hardware requires different dependencies, if your hardware meets
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>XPU</td>
|
||||
<td>KUNLUNXIN XPU</td>
|
||||
<td><a href="./PaddleOCR-VL-XPU.en.md">PaddleOCR-VL XPU Environment Configuration Tutorial</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DCU</td>
|
||||
<td>HYGON DCU</td>
|
||||
<td><a href="./PaddleOCR-VL-DCU.en.md">PaddleOCR-VL DCU Environment Configuration Tutorial</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@ -14,71 +14,66 @@ PaddleOCR-VL 是一款先进、高效的文档解析模型,专为文档中的
|
||||
|
||||
<table border="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<tr style="text-align: center;">
|
||||
<th>推理方式</th>
|
||||
<th>x64 CPU</th>
|
||||
<th>DCU</th>
|
||||
<th>XPU</th>
|
||||
<th>英伟达 GPU</th>
|
||||
<th>昆仑芯 XPU</th>
|
||||
<th>海光 DCU</th>
|
||||
<th>沐曦 GPU</th>
|
||||
<th>天数 GPU</th>
|
||||
<th>NVIDIA GPU</th>
|
||||
<th>x64 CPU</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<tr style="text-align: center;">
|
||||
<td>PaddlePaddle</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>
|
||||
<li>GPU Compute Capability ≥ 7</li>
|
||||
<li>CUDA 版本 ≥ 11.8</li>
|
||||
</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr style="text-align: center;">
|
||||
<td>vLLM</td>
|
||||
<td>❌</td>
|
||||
<td>✅</td>
|
||||
<td>🚧</td>
|
||||
<td>✅</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>
|
||||
<li>GPU Compute Capability ≥ 8 (RTX 3060,RTX 5070,A10,A100, ...) <br /></li>
|
||||
<li>CUDA 版本 ≥ 12.6</li><br />
|
||||
备注:7 ≤ GPU Compute Capability < 8 (T4,V100,...)支持运行,但可能出现请求超时、OOM 等异常情况,不推荐使用
|
||||
</td>
|
||||
<td>❌</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr style="text-align: center;">
|
||||
<td>SGLang</td>
|
||||
<td>❌</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>
|
||||
<li>8 ≤ GPU Compute Capability < 12</li>
|
||||
<li>CUDA 版本 ≥ 12.6</li>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>FastDeploy</td>
|
||||
<td>❌</td>
|
||||
<td>🚧</td>
|
||||
<td>✅</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>
|
||||
<li>8 ≤ GPU Compute Capability < 12</li>
|
||||
<li>CUDA 版本 ≥ 12.6</li>
|
||||
</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>❌</td>
|
||||
</tr>
|
||||
<tr style="text-align: center;">
|
||||
<td>FastDeploy</td>
|
||||
<td>✅</td>
|
||||
<td>✅</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>🚧</td>
|
||||
<td>❌</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
> 当前,PaddleOCR-VL 暂不支持 ARM 架构 CPU。后续将根据实际需求扩展更多硬件支持,敬请期待!
|
||||
> vLLM、SGLang 和 FastDeploy 无法在 Windows 或 macOS 上原生运行,请使用我们提供的 Docker 镜像。
|
||||
> **备注** :
|
||||
> 1. 使用英伟达 GPU 推理时需要注意 Compute Capability(简称 CC) 和 CUDA 版本(简称 CUDA)是否满足要求:
|
||||
> - PaddlePaddle: CC ≥ 7.0, CUDA ≥ 11.8
|
||||
> - vLLM: CC ≥ 8.0, CUDA ≥ 12.6
|
||||
> - SGLang: 8.0 ≤ CC < 12.0, CUDA ≥ 12.6
|
||||
> - FastDeploy: 8.0 ≤ CC < 12.0, CUDA ≥ 12.6
|
||||
> - CC ≥ 8 的常见显卡包括 RTX 30/40/50 系列及 A10/A100 等,更多型号可查看 [CUDA GPU 计算能力](https://developer.nvidia.cn/cuda-gpus)
|
||||
> 2. 虽然 vLLM 可在 T4/V100 等 CC 7.x 的 NVIDIA GPU 上启动,但容易出现超时或 OOM,不推荐使用。
|
||||
> 3. 当前,PaddleOCR-VL 暂不支持 ARM 架构 CPU。后续将根据实际需求扩展更多硬件支持,敬请期待!
|
||||
> 4. vLLM、SGLang 和 FastDeploy 无法在 Windows 或 macOS 上原生运行,请使用我们提供的 Docker 镜像。
|
||||
|
||||
由于不同硬件所需的依赖各不相同,如果您的硬件满足上述表格的要求,请参考下表查看对应的教程进行环境配置:
|
||||
|
||||
@ -95,18 +90,18 @@ PaddleOCR-VL 是一款先进、高效的文档解析模型,专为文档中的
|
||||
<td>本教程</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>NVIDIA GPU</td>
|
||||
<td>英伟达 GPU</td>
|
||||
<td>
|
||||
<li>NVIDIA Blackwell 架构 GPU(如RTX 50 系)参考 <a href="./PaddleOCR-VL-NVIDIA-Blackwell.md">PaddleOCR-VL NVIDIA Blackwell 架构 GPU 环境配置教程</a></li>
|
||||
<li>其他 NVIDIA GPU 参考本教程</li>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>XPU</td>
|
||||
<td>昆仑芯 XPU</td>
|
||||
<td><a href="./PaddleOCR-VL-XPU.md">PaddleOCR-VL XPU 环境配置教程</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DCU</td>
|
||||
<td>海光 DCU</td>
|
||||
<td><a href="./PaddleOCR-VL-DCU.md">PaddleOCR-VL DCU 环境配置教程</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user