Repository navigation
PaddleX/latest/pipeline_deploy/serving #3524
Replies: 60 comments 146 replies
|
您好,paddlex --serve --pipeline image_classification这样启动服务之后,关闭服务的命令是什么呀? |
|
paddlex --serve --pipeline {产线名称或产线配置文件路径} [{其他命令行选项}] 如果在部署多个产线, 是否要启动多个服务吗? |
|
服务化部署支持实时数据的高性能推理? |
|
我在测试‘高稳定性服务化部署’,使用通用OCR SDK,本地docker启动成功,client.py测试GRPCInferenceService通过,Metrics Service访问成功,但是HTTPService请求失败,一直报错400 Bad Request。想问一下HTTPService的接口调用文档有没有,请求参数是什么,怎么才能正确访问HTTPService |
|
SDK的下载链接都失效了,麻烦修复下吧 |
|
您好 |
|
docker部署的,为什么λ localhost ~/PaddleX paddlex --serve --pipeline OCR |
|
高稳定性服务化部署如何通过http方式调用 |
|
您好,这个SDK又不能下载了 |
|
您好,想请教下CUDA版本为12.4的话 怎么获取ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/hps:paddlex3.1-gpu的版本 这个只支持CUDA版本为11.8的吧? |
|
服务化部署如何开启高性能推理? |
|
执行 1.1 paddlex --install serving 一直报错啊,os 版本 AlmaLinux9.6, 在linux 上你们强烈建议使用 docker安装paddlex ,这里怎么没有使用docekr 安装的paddlex 执行服务部署的教程呀, 请大佬指教, 谢谢! Using cached future-1.0.0-py3-none-any.whl (491 kB) [notice] A new release of pip is available: 25.0.1 -> 25.1.1 During handling of the above exception, another exception occurred: Traceback (most recent call last): |
|
https://paddlepaddle.github.io/PaddleX/latest/pipeline_deploy/serving.html#23 调整后的 pipeline_config.yaml pipeline_name: OCR text_type: general use_doc_preprocessor: True SubPipelines: SubModules: |
|
对于这种启动服务后还需下载的模型,因为网络原因无法下载怎么办,可以手动挂载吗 I0718 07:56:17.887946 7 grpc_server.cc:4117] Started GRPCInferenceService at 0.0.0.0:8001 The above exception was the direct cause of the following exception: Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): |
|
2.4.2 手动构造 HTTP 请求,构造的请求体格式不对,"data"中的json应该是String类型。 |
|
已经部署完毕了 curl -s -X POST http://localhost:8000/v2/models/ocr/infer -H 'Content-Type: application/json' -d "{ |
|
ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/hps:paddlex3.3-cpu 这个镜像进入到容器里 咋啥也没有呢?paddlex, paddle都没有安装么?只有一个python? |
|
您好,我在910B上使用基础服务部署的,命令paddlex --serve --pipeline ocr 为什么发送请求每张新的图片显存就会增长,但是跑完显存不会释放。有没有解决办法? |
|
我想问下,可以在paddleOCR-VL产线的ymal配置文件中加入印章识别模块吗?我尝试了将ppstructure的中配置印章模块复制过去,模型路径也做了修改。但是返回结果一直是图片格式,没有返回印章文本。 |
|
在启动容器后,转TensorRT模型,出现这个错误,Error Code 3: API Usage Error,容器会一直循环下载转换模型这一过程。这是什么错误啊。显存还有20多G呢 Creating model: ('PP-LCNet_x1_0_doc_ori', None)
Using official model (PP-LCNet_x1_0_doc_ori), the model files will be automatically downloaded and saved in /root/.paddlex/official_models.
Downloading [README.md]: 100%|██████████| 6.67k/6.67k [00:00<00:00, 15.0kB/s]
Downloading [inference.json]: 100%|██████████| 102k/102k [00:00<00:00, 226kB/s]
Downloading [config.json]: 100%|██████████| 2.50k/2.50k [00:00<00:00, 3.08kB/s]
Downloading [inference.yml]: 100%|██████████| 766/766 [00:00<00:00, 1.04kB/s]
Downloading [inference.pdiparams]: 100%|██████████| 6.44M/6.44M [00:02<00:00, 2.34MB/s]
Processing 5 items: 100%|██████████| 5.00/5.00 [00:03<00:00, 1.34it/s]<00:00, 1.94MB/s]
INFO:root:Create a symbolic link pointing to /paddlex/py310/lib/python3.10/site-packages/ultra_infer/libs/third_libs/tensorrt/lib/libnvcaffe_parser.so.8 named /paddlex/py310/lib/python3.10/site-packages/ultra_infer/libs/third_libs/tensorrt/lib/libnvcaffe_parser.so.
INFO:root:Create a symbolic link pointing to /paddlex/py310/lib/python3.10/site-packages/ultra_infer/libs/third_libs/tensorrt/lib/libnvinfer_plugin.so.8 named /paddlex/py310/lib/python3.10/site-packages/ultra_infer/libs/third_libs/tensorrt/lib/libnvinfer_plugin.so.
INFO:root:Create a symbolic link pointing to /paddlex/py310/lib/python3.10/site-packages/ultra_infer/libs/third_libs/tensorrt/lib/libnvinfer.so.8 named /paddlex/py310/lib/python3.10/site-packages/ultra_infer/libs/third_libs/tensorrt/lib/libnvinfer.so.
INFO:root:Create a symbolic link pointing to /paddlex/py310/lib/python3.10/site-packages/ultra_infer/libs/third_libs/tensorrt/lib/libnvonnxparser.so.8 named /paddlex/py310/lib/python3.10/site-packages/ultra_infer/libs/third_libs/tensorrt/lib/libnvonnxparser.so.
INFO:root:Create a symbolic link pointing to /paddlex/py310/lib/python3.10/site-packages/ultra_infer/libs/third_libs/tensorrt/lib/libnvparsers.so.8 named /paddlex/py310/lib/python3.10/site-packages/ultra_infer/libs/third_libs/tensorrt/lib/libnvparsers.so.
Automatically converting PaddlePaddle model to ONNX format
Inference backend: tensorrt
Inference backend config: precision='fp16' use_dynamic_shapes=True dynamic_shapes={'x': [[1, 3, 224, 224], [1, 3, 224, 224], [8, 3, 224, 224]]}
[INFO] ultra_infer/runtime/backends/tensorrt/trt_backend.cc(567)::BuildTrtEngine [TrtBackend] Use FP16 to inference.
[INFO] ultra_infer/runtime/backends/tensorrt/trt_backend.cc(572)::BuildTrtEngine Start to building TensorRT Engine...
[INFO] ultra_infer/runtime/backends/tensorrt/trt_backend.cc(659)::BuildTrtEngine TensorRT Engine is built successfully.
[INFO] ultra_infer/runtime/backends/tensorrt/trt_backend.cc(661)::BuildTrtEngine Serialize TensorRTEngine to local file /root/.paddlex/official_models/PP-LCNet_x1_0_doc_ori/.cache/tensorrt/trt_serialized.trt.
[INFO] ultra_infer/runtime/backends/tensorrt/trt_backend.cc(672)::BuildTrtEngine TensorRTEngine is serialized to local file /root/.paddlex/official_models/PP-LCNet_x1_0_doc_ori/.cache/tensorrt/trt_serialized.trt, we can load this model from the serialized engine directly next time.
[ERROR] ultra_infer/runtime/backends/tensorrt/trt_backend.cc(239)::log 3: [runtime.cpp::~Runtime::346] Error Code 3: API Usage Error (Parameter check failed at: runtime/rt/runtime.cpp::~Runtime::346, condition: mEngineCounter.use_count() == 1. Destroying a runtime before destroying deserialized engines created by the runtime leads to undefined behavior.
)
[INFO] ultra_infer/runtime/runtime.cc(320)::CreateTrtBackend Runtime initialized with Backend::TRT in Device::GPU. |
|
麻烦问一下,文档场景信息抽取v3产线的端点名称是什么? |
|
用默认构造请求的方式请求,不通。 |
|
你好,使用ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/hps:paddlex3.4-gpu这个镜像。执行docker run |
|
想咨询下http请求解析本地图片,怎么构造请求体 读取本地图片并转换为 base64with open("11.png", "rb") as image_file: response = requests.post( 使用url是正常的,但是改成本地图片就不行了 |
|
您好,3.5的镜像拉取不了 docker pull ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/hps:paddlex3.5-gpu |
|
请问昇腾如何实现服务化部署多实例+高性能推理,有无参考命令,目前官网文档只找到了高性能推理插件命令--use_hpip, |
|
2026年4月30日,为什么docker镜像还不支持50系列的显卡高性能部署,40系列显卡都淘汰了 |
|
什么时候支持50系列显卡高性能部署啊,有没有时间节点啊 |
|
高稳定性服务化部署 运行报错 docker run -it -e PADDLEX_HPS_DEVICE_TYPE=cpu -v "$(pwd)":/app -w /app --rm --init --network host --shm-size 8g ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/hps:paddlex3.5-cpu /bin/bash server.sh
I0514 07:59:28.376264 7 model_repository_manager.cc:1022] loading: ocr:1
I0514 07:59:28.486763 7 python.cc:1880] TRITONBACKEND_ModelInstanceInitialize: ocr_0 (CPU device 0)
[ INFO] [2026-05-14 07:59:31,474] [*] [*] - Triton model config: {'name': 'ocr', 'platform': '', 'backend': 'python', 'version_policy': {'latest': {'num_versions': 1}}, 'max_batch_size': 8, 'input': [{'name': 'input', 'data_type': 'TYPE_STRING', 'format': 'FORMAT_NONE', 'dims': [-1], 'is_shape_tensor': False, 'allow_ragged_batch': False}], 'output': [{'name': 'output', 'data_type': 'TYPE_STRING', 'dims': [-1], 'label_filename': '', 'is_shape_tensor': False}], 'batch_input': [], 'batch_output': [], 'optimization': {'priority': 'PRIORITY_DEFAULT', 'input_pinned_memory': {'enable': True}, 'output_pinned_memory': {'enable': True}, 'gather_kernel_buffer_threshold': 0, 'eager_batching': False}, 'dynamic_batching': {'preferred_batch_size': [8], 'max_queue_delay_microseconds': 0, 'preserve_ordering': False, 'priority_levels': 0, 'default_priority_level': 0, 'priority_queue_policy': {}}, 'instance_group': [{'name': 'ocr_0', 'kind': 'KIND_CPU', 'count': 1, 'gpus': [], 'secondary_devices': [], 'profile': [], 'passive': False, 'host_policy': ''}], 'default_model_filename': '', 'cc_model_filenames': {}, 'metric_tags': {}, 'parameters': {}, 'model_warmup': []}
[ INFO] [2026-05-14 07:59:31,474] [*] [*] - Input names: ['input']
[ INFO] [2026-05-14 07:59:31,474] [*] [*] - Output names: ['output']
Creating model: ('PP-LCNet_x1_0_doc_ori', None, None)
Checking connectivity to the model hosters, this may take a while. To bypass this check, set `PADDLE_PDX_DISABLE_MODEL_SOURCE_CHECK` to `True`.
Using official model (PP-LCNet_x1_0_doc_ori), the model files will be automatically downloaded and saved in `/root/.paddlex/official_models/PP-LCNet_x1_0_doc_ori`.
inference.yml: 100%|███████████████████████████████████████████████████████████████████| 766/766 [00:00<00:00, 1.47MB/s]
.gitattributes: 1.57kB [00:00, 378kB/s]
inference.json: 104kB [00:00, 12.1MB/s]
README.md: 6.85kB [00:00, 1.65MB/s] | 1/6 [00:00<00:02, 1.99it/s]
config.json: 2.56kB [00:00, 4.09MB/s]
inference.pdiparams: 100%|█████████████████████████████████████████████████████████| 6.75M/6.75M [00:01<00:00, 3.49MB/s]
Fetching 6 files: 100%|███████████████████████████████████████████████████████████████████| 6/6 [00:02<00:00, 2.36it/s]
Creating model: ('UVDoc', None, None)
Using official model (UVDoc), the model files will be automatically downloaded and saved in `/root/.paddlex/official_models/UVDoc`.
README.md: 4.46kB [00:00, 206kB/s] | 0/6 [00:00<?, ?it/s]
.gitattributes: 1.57kB [00:00, 220kB/s]
config.json: 1.49kB [00:00, 1.09MB/s]
inference.json: 191kB [00:00, 137MB/s] | 1/6 [00:00<00:01, 2.79it/s]
inference.yml: 100%|███████████████████████████████████████████████████████████████████| 330/330 [00:00<00:00, 1.38MB/s]
inference.pdiparams: 100%|█████████████████████████████████████████████████████████| 32.1M/32.1M [00:13<00:00, 2.35MB/s]
Fetching 6 files: 100%|███████████████████████████████████████████████████████████████████| 6/6 [00:14<00:00, 2.33s/it]
Creating model: ('PP-LCNet_x1_0_textline_ori', None, None)
Using official model (PP-LCNet_x1_0_textline_ori), the model files will be automatically downloaded and saved in `/root/.paddlex/official_models/PP-LCNet_x1_0_textline_ori`.
README.md: 3.55kB [00:00, 8.07MB/s] | 0/6 [00:00<?, ?it/s]
inference.yml: 100%|███████████████████████████████████████████████████████████████████| 735/735 [00:00<00:00, 2.56MB/s]
.gitattributes: 1.57kB [00:00, 1.97MB/s]
inference.json: 104kB [00:00, 83.6MB/s] | 1/6 [00:00<00:01, 2.90it/s]
config.json: 2.49kB [00:00, 11.8MB/s]
inference.pdiparams: 100%|█████████████████████████████████████████████████████████| 6.74M/6.74M [00:01<00:00, 3.48MB/s]
Fetching 6 files: 100%|███████████████████████████████████████████████████████████████████| 6/6 [00:02<00:00, 2.71it/s]
0514 07:59:56.121384 15 pb_stub.cc:352] Failed to initialize Python stub: FileNotFoundError: [Errno 2] No such file or directory: '/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/runners/hpi/hpi_model_info_collection.json'
At:
/usr/lib/python3.10/pathlib.py(1117): open
/usr/lib/python3.10/importlib/abc.py(433): open_resource
/usr/lib/python3.10/importlib/resources.py(46): open_binary
/usr/lib/python3.10/importlib/resources.py(82): open_text
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/runners/hpi/backend.py(37): _get_hpi_model_info_collection
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/runners/hpi/backend.py(125): suggest_inference_backend_and_config
/paddlex/py310/lib/python3.10/site-packages/paddlex/utils/deps.py(145): _wrapper
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/runners/hpi/runner.py(114): _determine_backend_and_config
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/runners/hpi/runner.py(70): __init__
/paddlex/py310/lib/python3.10/site-packages/paddlex/utils/deps.py(158): _wrapper
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/engines/hpi.py(91): runner_builder
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/engines/_base.py(190): build_runner
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/__init__.py(311): _build_predictor_runner
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/__init__.py(338): _build_predictor_kwargs
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/__init__.py(469): create_predictor
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/pipelines/base.py(141): create_model
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/pipelines/ocr/pipeline.py(95): __init__
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/pipelines/_parallel.py(190): _create_internal_pipeline
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/pipelines/_parallel.py(135): __init__
/paddlex/py310/lib/python3.10/site-packages/paddlex/utils/deps.py(208): _wrapper
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/pipelines/__init__.py(169): create_pipeline
/paddlex/py310/lib/python3.10/site-packages/paddlex_hps_server/base_model.py(205): _create_pipeline
/paddlex/py310/lib/python3.10/site-packages/paddlex_hps_server/base_model.py(80): initialize
/paddlex/var/paddlex_model_repo/ocr/1/model.py(47): initialize
E0514 07:59:56.122048 7 model_repository_manager.cc:1186] failed to load 'ocr' version 1: Internal: FileNotFoundError: [Errno 2] No such file or directory: '/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/runners/hpi/hpi_model_info_collection.json'
At:
/usr/lib/python3.10/pathlib.py(1117): open
/usr/lib/python3.10/importlib/abc.py(433): open_resource
/usr/lib/python3.10/importlib/resources.py(46): open_binary
/usr/lib/python3.10/importlib/resources.py(82): open_text
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/runners/hpi/backend.py(37): _get_hpi_model_info_collection
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/runners/hpi/backend.py(125): suggest_inference_backend_and_config
/paddlex/py310/lib/python3.10/site-packages/paddlex/utils/deps.py(145): _wrapper
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/runners/hpi/runner.py(114): _determine_backend_and_config
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/runners/hpi/runner.py(70): __init__
/paddlex/py310/lib/python3.10/site-packages/paddlex/utils/deps.py(158): _wrapper
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/engines/hpi.py(91): runner_builder
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/engines/_base.py(190): build_runner
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/__init__.py(311): _build_predictor_runner
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/__init__.py(338): _build_predictor_kwargs
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/__init__.py(469): create_predictor
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/pipelines/base.py(141): create_model
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/pipelines/ocr/pipeline.py(95): __init__
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/pipelines/_parallel.py(190): _create_internal_pipeline
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/pipelines/_parallel.py(135): __init__
/paddlex/py310/lib/python3.10/site-packages/paddlex/utils/deps.py(208): _wrapper
/paddlex/py310/lib/python3.10/site-packages/paddlex/inference/pipelines/__init__.py(169): create_pipeline
/paddlex/py310/lib/python3.10/site-packages/paddlex_hps_server/base_model.py(205): _create_pipeline
/paddlex/py310/lib/python3.10/site-packages/paddlex_hps_server/base_model.py(80): initialize
/paddlex/var/paddlex_model_repo/ocr/1/model.py(47): initialize
I0514 07:59:56.122230 7 server.cc:522]
+------------------+------+
| Repository Agent | Path |
+------------------+------+
+------------------+------+
I0514 07:59:56.122271 7 server.cc:549]
+---------+------+--------+
| Backend | Path | Config |
+---------+------+--------+
+---------+------+--------+
I0514 07:59:56.122375 7 server.cc:592]
+-------+---------+--------------------------------------------------------------------------------------------------+
| Model | Version | Status |
+-------+---------+--------------------------------------------------------------------------------------------------+
| ocr | 1 | UNAVAILABLE: Internal: FileNotFoundError: [Errno 2] No such file or directory: '/paddlex/py310/l |
| | | ib/python3.10/site-packages/paddlex/inference/models/runners/hpi/hpi_model_info_collection.json' |
| | | |
| | | At: |
| | | /usr/lib/python3.10/pathlib.py(1117): open |
| | | /usr/lib/python3.10/importlib/abc.py(433): open_resource |
| | | /usr/lib/python3.10/importlib/resources.py(46): open_binary |
| | | /paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/runners/hpi/backend.py(37 |
| | | ): _get_hpi_model_info_collection |
| | | /paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/runners/hpi/backend.py(37): _get_hpi_model_info_collection |
| | | /paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/runners/hpi/runner.py(114 |
| | | ): _determine_backend_and_config |
| | | /paddlex/py310/lib/python3.10/site-packages/paddlex/utils/deps.py(145): _wrapper |
| | | /paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/engines/hpi.py(91): runne |
| | | r_builder |
| | | /paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/__init__.py(311): _build_ |
| | | predictor_runner |
| | | /paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/__init__.py(469): create_ |
| | | predictor |
| | | /paddlex/py310/lib/python3.10/site-packages/paddlex/inference/pipelines/ocr/pipeline.py(95): _ |
| | | _init__ |
| | | /paddlex/py310/lib/python3.10/site-packages/paddlex/inference/pipelines/_parallel.py(135): __i |
| | | nit__ |
| | | /paddlex/py310/lib/python3.10/site-packages/paddlex/inference/pipelines/__init__.py(169): crea |
| | | te_pipeline |
| | | /paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/__init__.py(338): _build_predictor_kwargs |
| | | /paddlex/py310/lib/python3.10/site-packages/paddlex/inference/models/__init__.py(469): create_predictor |
| | | /paddlex/py310/lib/python3.10/site-packages/paddlex/inference/pipelines/base.py(141): create_model |
+-------+---------+--------------------------------------------------------------------------------------------------+
I0514 07:59:56.122539 7 tritonserver.cc:1920]
+----------------------------------+----------------------------------------------------------------------------------+
| Option | Value |
+----------------------------------+----------------------------------------------------------------------------------+
| server_id | triton |
| server_version | 2.15.0 |
| server_extensions | classification sequence model_repository model_repository(unload_dependents) sch |
| | edule_policy model_configuration system_shared_memory cuda_shared_memory binary_ |
| | tensor_data statistics |
| model_repository_path[0] | /paddlex/var/paddlex_model_repo |
| model_control_mode | MODE_NONE |
| strict_model_config | 1 |
| rate_limit | OFF |
| pinned_memory_pool_byte_size | 268435456 |
| response_cache_byte_size | 0 |
| min_supported_compute_capability | 0.0 |
| strict_readiness | 1 |
| exit_timeout | 30 |
+----------------------------------+----------------------------------------------------------------------------------+
I0514 07:59:56.122570 7 server.cc:252] Waiting for in-flight requests to complete.
I0514 07:59:56.122581 7 server.cc:267] Timeout 30: Found 0 live models and 0 in-flight non-inference requests
error: creating server: Internal - failed to load all models
|
pip install paddlex 全都跑了一遍 paddlex 3.5.2 pip show paddlex cuda 13.0 结果连值都没有,这bug太恶心了吧 |

Uh oh!
There was an error while loading. Please reload this page.
PaddleX/latest/pipeline_deploy/serving
https://paddlepaddle.github.io/PaddleX/latest/pipeline_deploy/serving.html
All reactions