PaddleOCR 3.0.0 可用的Docker镜像 #15675
-
🔎 Search before asking
🐛 Bug (问题描述)描述我在尝试使用 PaddleOCR 的 Docker 镜像时遇到了版本兼容性的问题。 已尝试的方法
请求是否可以提供一个适用于 PaddleOCR 3.0.0 的官方 Docker 镜像,或者建议一种可行的解决方案来解决这些依赖问题? 🏃♂️ Environment (运行环境)Hardware
Software
🌰 Minimal Reproducible Example (最小可复现问题的Demo)Steps to Reproduce1. Pull the Official Docker Imagedocker pull ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddle:3.0.0-gpu-cuda11.8-cudnn8.9-trt8.6 2. Run the Containerdocker run --gpus all -it --name paddleocr-test \
ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddle:3.0.0-gpu-cuda11.8-cudnn8.9-trt8.6 \
/bin/bash 3. Check Pre-installed Package Versions# Check PyYAML version
python -c "import yaml; print('PyYAML version:', yaml.__version__); print('Location:', yaml.__file__)"
# Output: PyYAML version: 5.3.1, Location: /usr/lib/python3/dist-packages/yaml/__init__.py 4. Attempt to Install PaddleOCR 3.0.1pip install paddleocr==3.0.1 Installation fails with dependency conflicts:
5. Attempt to Upgrade PyYAMLpip install --force-reinstall PyYAML==6.0.2 Result: Fails with error:
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
I had the same issue. For a quick fix, try pip install --ignore-installed PyYAML to overwrite it. It's still best to avoid installing with distutils, though. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the quick fix solution! It works. |
Beta Was this translation helpful? Give feedback.
-
新问题更新在前述问题绕过 paddleocr ocr -i test_image.png --use_doc_orientation_classify False --use_doc_unwarping False --use_textline_orientation False 然而,在启用高性能推理时遇到了新的问题: 执行以下命令后: paddleocr ocr --enable_hpi True -i test_image.png --use_doc_orientation_classify False --use_doc_unwarping False --use_textline_orientation False 遇到信息: Creating model: ('PP-OCRv5_server_det', None)
Using official model (PP-OCRv5_server_det), the model files will be automatically downloaded and saved in /root/.paddlex/official_models.
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
/usr/local/lib/python3.10/dist-packages/setuptools-68.2.2-py3.10.egg/_distutils_hack/__init__.py:18: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/setuptools-68.2.2-py3.10.egg/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
Inference backend: tensorrt
Inference backend config: precision='fp32' use_dynamic_shapes=True dynamic_shapes={'x': [[1, 3, 32, 32], [1, 3, 736, 736], [1, 3, 4000, 4000]]}
[INFO] ultra_infer/runtime/backends/tensorrt/trt_backend.cc(572)::BuildTrtEngine Start to building TensorRT Engine...
[ERROR] ultra_infer/runtime/backends/tensorrt/trt_backend.cc(239)::log 1: No Myelin Error exists
[ERROR] ultra_infer/runtime/backends/tensorrt/trt_backend.cc(239)::log 1: [runnerBuilderBase.cpp::buildAndSerializeMyelinGraph::326] Error Code 1: Myelin (No Myelin Error exists)
[ERROR] ultra_infer/runtime/backends/tensorrt/trt_backend.cc(636)::BuildTrtEngine Failed to call buildSerializedNetwork().
[ERROR] ultra_infer/runtime/backends/tensorrt/trt_backend.cc(752)::CreateTrtEngineFromOnnx Failed to build tensorrt engine.
[INFO] ultra_infer/runtime/runtime.cc(320)::CreateTrtBackend Runtime initialized with Backend::TRT in Device::GPU.
Creating model: ('PP-OCRv5_server_rec', None)
Using official model (PP-OCRv5_server_rec), the model files will be automatically downloaded and saved in /root/.paddlex/official_models.
Using Paddle Inference backend
Paddle predictor option: device_type: gpu, device_id: 0, run_mode: trt_fp16, trt_dynamic_shapes: {'x': [[1, 3, 48, 160], [1, 3, 48, 320], [8, 3, 48, 3200]]}, cpu_threads: 8, delete_pass: [], enable_new_ir: True, enable_cinn: False, trt_cfg_setting: {'precision_mode': <PrecisionMode.FP16: 'FP16'>}, trt_use_dynamic_shapes: True, trt_collect_shape_range_info: True, trt_discard_cached_shape_range_info: False, trt_dynamic_shape_input_data: None, trt_shape_range_info_path: None, trt_allow_rebuild_at_runtime: True
[ERROR] ultra_infer/runtime/backends/tensorrt/trt_backend.cc(445)::SetInputs TRTBackend SetInputs not find name:x
--------------------------------------
C++ Traceback (most recent call last):
--------------------------------------
No stack trace in paddle, may be caused by external reasons.
----------------------
Error Message Summary:
----------------------
FatalError: `Process abort signal` is detected by the operating system.
[TimeInfo: *** Aborted at 1749542064 (unix time) try "date -d @1749542064" if you are using GNU date ***]
[SignalInfo: *** SIGABRT (@0x3961) received by PID 14689 (TID 0x7f9042829740) from PID 14689 ***]
Aborted (core dumped) |
Beta Was this translation helpful? Give feedback.
-
可以试试删除
|
Beta Was this translation helpful? Give feedback.
可以试试删除
/root/.paddlex/official_models
下的模型后重新运行命令试下,如果还不可以,麻烦运行下面三条指令,贴一下结果,我看看是不是哪里没对齐