Replies: 1 comment
-
从你提供的错误信息来看,PP-OCR在GPU上运行时出现了段错误(Segmentation fault)。这个问题可能与以下几个原因有关:
解决方案建议
示例Dockerfile修改FROM nvidia/cuda:12.2.0-devel-ubuntu22.04
RUN apt-get update -y \
&& apt-get install -y python3-pip \
&& apt-get install -y less \
&& apt-get install -y libgl1 \
&& apt-get install -y libglib2.0-0 \
&& apt-get install -y cudnn9-cuda-12
WORKDIR app
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
# 确保安装了nvidia-cudnn和nvidia-cuda-toolkit
RUN apt-get install -y nvidia-cudnn nvidia-cuda-toolkit
RUN python3 -c "from paddleocr import PaddleOCR; PaddleOCR(use_angle_cls=False, lang='en', ocr_version='PP-OCR', use_space_char=True, cls=False, bin=False, inv=False, alpha_color=False, max_text_length=100)"
COPY startup.sh startup.sh
RUN chmod +x startup.sh
EXPOSE 8000
ENTRYPOINT ["/app/startup.sh"] 运行Docker容器nvidia-docker run -it --rm your-docker-image 通过以上步骤,你应该能够解决PP-OCR在GPU上运行时出现的段错误问题。如果问题仍然存在,建议进一步检查系统日志或联系PaddlePaddle社区获取支持。 Response generated by 🤖 feifei-bot | deepseek-chat |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🔎 Search before asking
🐛 Bug (问题描述)
I have a issue when I try run
PP-OCR
instead of default versionPP-OCRv4
🏃♂️ Environment (运行环境)
Dockerfile:
startup.sh
#!/bin/bash /opt/nvidia/nvidia_entrypoint.sh python3 server.py
But when I build for CPU:
works correctly.
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
requirements for GPU:
requirements.txt for CPU:
Beta Was this translation helpful? Give feedback.
All reactions