Skip to content

[Bug]:GPU SLOWNESS #137

@yepyhun

Description

@yepyhun

Do you need to file an issue?

  • I have searched the existing issues and this bug is not already filed.
  • I believe this is a legitimate bug, not just a question or feature request.

Describe the bug

The Docker implementation of DeepTutor uses a CPU-only base image (python:3.11-slim), which prevents GPU-accelerated PDF processing in MinerU. This results in extreme slowness (approx. 40 seconds per page on a system with an RTX 3070 Ti) as the system falls back to CPU inference.
Log output showing high inference times:

INFO:raganything.parser:[MinerU] Predict:  13%|█▎ | 464/3696 [10:22<36:49:49, 41.02s/it]

Steps to reproduce

  1. Start DeepTutor using the provided docker-compose.yml and Dockerfile.
  2. Upload a large PDF for ingestion.
  3. Observe the logs during the MinerU Predict phase.
  4. Inference speed will be extremely slow due to CPU usage.

Expected Behavior

The Docker image should support NVIDIA GPU acceleration by default (or via a specific build target) to enable fast VLM inference, especially when the host machine has a compatible GPU.

Related Module

  • Dockerfile
  • docker-compose.yml

Configuration Used

  • DeepTutor Version: v0.5.0
  • Base Image: python:3.11-slim (original)
  • GPU: NVIDIA GeForce RTX 3070 Ti
    deeptutor version 0.5

Additional Information

  • Root Cause: The python:3.11-slim image does not contain the necessary NVIDIA CUDA drivers/libraries, and the default pip install -r requirements.txt installs the CPU version of PyTorch.
  • Proposed Fix:
    1. Switch the base image to nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04.
    2. Install Python 3.11 on top of the CUDA base.
    3. Explicitly install the CUDA-enabled version of PyTorch during build:
      pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
    4. Ensure docker-compose.yml includes the GPU reservation block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions