微信扫码
添加专属顾问
我要投稿
租用AutoDL服务器
选用RTX3090
PyTorch 2.1.0 Python 3.10(ubuntu22.04) Cuda 12.1
--no-cache-dir 不用缓存
选用清华源,官网的阿里云检索不到magic-pdf[full]
conda creat -n MinerU python=3.10.0conda activate MinerUpip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir
查看是否安装成功
magic-pdf --version
https://github.com/opendatalab/MinerU/blob/master/docs/how_to_download_models_zh_cn.md
pip install modelscopewget https://gitee.com/myhloli/MinerU/raw/master/scripts/download_models.py -O download_models.pypython download_models.py
python脚本会自动下载模型文件并配置好配置文件中的模型目录
配置文件可以在用户目录中找到,文件名为magic-pdf.json
下载模型后移动models 和layoutreader到autodl-tmp文件夹中(任意文件夹中都行)
# 移动modelsmv /root/.cache/modelscope/hub/opendatalab/PDF-Extract-Kit-1.0 /root/autodl-tmp/models# 移动layoutreadermv /root/.cache/modelscope/hub/ppaanngggg/layoutreader /root/autodl-tmp/layoutreader
修改生成的magic-pdf.json中的“models-dir”和“layoutreader-model-dir”参数
{"bucket_info": {"bucket-name-1": ["ak","sk","endpoint"],"bucket-name-2": ["ak","sk","endpoint"]},"models-dir": "/root/autodl-tmp/models","layoutreader-model-dir": "/root/autodl-tmp/layoutreader","device-mode": "cuda","layout-config": {"model": "layoutlmv3"},"formula-config": {"mfd_model": "yolo_v8_mfd","mfr_model": "unimernet_small","enable": true},"table-config": {"model": "rapid_table","enable": false,"max_time": 400},"config_version": "1.0.0"}python -m pip install paddlepaddle-gpu==3.0.0b1 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/
在MinerU虚拟环境下运行
magic-pdf -p PDF的地址 -o 输出位置
举例:将root文件下的small_ocr.pdf文件转换完后,保存在/root/autodl-tmp/output
magic-pdf -p /root/small_ocr.pdf -o /root/autodl-tmp/output
输出结果为:
53AI,企业落地大模型首选服务商
产品:场景落地咨询+大模型应用平台+行业解决方案
承诺:免费POC验证,效果达标后再合作。零风险落地应用大模型,已交付160+中大型企业
2026-03-23
128K Star 的开源 AI 编程 Agent,把 Anthropic 逼到发律师函了
2026-03-23
字节跳动开源 DeerFlow 2.0:下一代超级 Agent 引擎,一键搞定复杂工作流!
2026-03-23
企业中职能部门打工人如何选小龙虾
2026-03-23
MiniMax开源技能包:让AI写代码从大学生变资深工程师
2026-03-22
OxyGent:构建高效能多智能体系统的协作框架
2026-03-22
Ollama绝赞适配World Monitor:无需API密钥的全球情报看板,金融地缘一手掌握!`
2026-03-22
重磅!VS Code 正式“改名”!绿色版 VS Code 更强!
2026-03-21
Hugging Face:AI 界的 GitHub 与开源协作的终极生态杠杆
2026-01-27
2026-01-30
2026-01-12
2026-01-29
2026-01-27
2026-01-28
2026-01-21
2026-01-06
2026-01-26
2026-01-23
2026-03-17
2026-03-13
2026-03-02
2026-02-05
2026-01-28
2026-01-26
2026-01-21
2026-01-21