MinerU icon indicating copy to clipboard operation
MinerU copied to clipboard

cuda 12.6上dockerfile已经无法正常工作了

Open RunshengZhu opened this issue 2 months ago • 10 comments

Description of the bug | 错误描述

按照文档说明,拉取最新的dockerfile成功build,但是进入容器处理pdf文件时,magic-pdf报错如下: /opt/mineru_venv/lib/python3.10/site-packages/paddle/base/framework.py:743: UserWarning: You are using GPU version Paddle, but your CUDA device is not set properly. CPU device will be used by default. warnings.warn( import tensorrt_llm failed, if do not use tensorrt, ignore this message import lmdeploy failed, if do not use lmdeploy, ignore this message 2024-12-04 07:16:35.273 | INFO | magic_pdf.libs.pdf_check:detect_invalid_chars_by_pymupdf:84 - uffd_count: 0, text_len: 38047, uffd_chars_radio: 0.0 2024-12-04 07:16:35.277 | INFO | magic_pdf.model.pdf_extract_kit:init:78 - DocAnalysis init, this may take some times, layout_model: layoutlmv3, apply_formula: True, apply_ocr: False, apply_table: False, table_model: rapid_table, lang: None 2024-12-04 07:16:35.277 | INFO | magic_pdf.model.pdf_extract_kit:init:91 - using device: cuda 2024-12-04 07:16:35.277 | INFO | magic_pdf.model.pdf_extract_kit:init:95 - using models_dir: /root/.cache/modelscope/hub/opendatalab/PDF-Extract-Kit-1___0/models CustomVisionEncoderDecoderModel init VariableUnimerNetModel init VariableUnimerNetPatchEmbeddings init VariableUnimerNetModel init VariableUnimerNetPatchEmbeddings init CustomMBartForCausalLM init CustomMBartDecoder init 2024-12-04 07:16:46.208 | ERROR | magic_pdf.tools.cli:parse_doc:108 - CUDA driver initialization failed, you might not have a CUDA gpu.

How to reproduce the bug | 如何复现

在cuda 12.6的server上按照下面的步骤可以复现 wget https://github.com/opendatalab/MinerU/raw/master/Dockerfile docker build -t mineru:latest . docker run --rm -it --gpus=all mineru:latest /bin/bash magic-pdf --help magic-pdf -p xxx.pdf -o output

Operating system | 操作系统

Linux

Python version | Python 版本

3.10

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

0.10.x

Device mode | 设备模式

cuda

RunshengZhu avatar Dec 04 '24 08:12 RunshengZhu