Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

magic-pdf -p demo1.pdf Illegal instruction | 执行magic-pdf提示指令非法 #591

Closed
Joyouspeng opened this issue Sep 11, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Joyouspeng
Copy link

Description of the bug | 错误描述

执行magic-pdf -p demo1.pdf后,打印

2024-09-11 12:26:07.581 | INFO     | magic_pdf.libs.pdf_check:detect_invalid_chars:57 - cid_count: 1, text_len: 35537, cid_chars_radio: 2.8144437251977146e-05
Illegal instruction

How to reproduce the bug | 如何复现

  1. wget -U NoSuchBrowser/1.0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2024.06-1-Linux-x86_64.sh

  2. bash Anaconda3-2024.06-1-Linux-x86_64.sh (在这里指定了conda的安装目录、后续编辑了~/.bashrc的内容“export PATH=$PATH:/data/minerU/anaconda3/bin”)

  3. conda create -n MinerU python=3.10

  4. pip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com 这个超时(在下载这个paddlepaddle包的时候)了,采用下面的命令执行
    pip install -U magic-pdf[full]==0.7.1 --extra-index-url https://wheels.myhloli.com -i https://pypi.tuna.tsinghua.edu.cn/simple

  5. 安装模型pip install modelscope -i https://pypi.tuna.tsinghua.edu.cn/simple 并创建py脚本执行snapshot_download方法

  6. 第一次运行前配置,配置完 报错:“ImportError: libGL.so.1: cannot open shared object file: No such file or directory”
    wget https://gitee.com/myhloli/MinerU/raw/master/magic-pdf.template.json
    cp magic-pdf.template.json ~/magic-pdf.json
    根据报错 安装
    yum install mesa-libGL-devel mesa-libGL

  7. 执行测试
    wget https://gitee.com/myhloli/MinerU/raw/master/demo/small_ocr.pdf
    magic-pdf -p small_ocr.pdf
    报错:
    “2024-09-11 12:26:07.581 | INFO | magic_pdf.libs.pdf_check:detect_invalid_chars:57 - cid_count: 1, text_len: 35537, cid_chars_radio: 2.8144437251977146e-05
    Illegal instruction”

模型文件核对过了
image

Operating system | 操作系统

Linux

Python version | Python 版本

3.10

Software version | 软件版本 (magic-pdf --version)

0.7.x

Device mode | 设备模式

cpu

@Joyouspeng Joyouspeng added the bug Something isn't working label Sep 11, 2024
@Joyouspeng Joyouspeng changed the title magic-pdf -p demo1.pdf Illegal instruction magic-pdf -p demo1.pdf Illegal instruction | 执行magic-pdf提示指令非法 Sep 11, 2024
@myhloli
Copy link
Collaborator

myhloli commented Sep 11, 2024

看上去像是cpu指令集不兼容,这个除了换服务器配置无解

@Joyouspeng
Copy link
Author

Snipaste_2024-09-11_14-33-36

这个是开发环境的cpu配置 如何检视硬件条件呢?

@myhloli
Copy link
Collaborator

myhloli commented Sep 11, 2024

理论上没有什么特殊要求,看之前其他人的反馈应该是需要AVX或者AVX2指令集支持,你这个金至强看上去时不支持的?
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants