xuanhoatrieu/tuaf-ocr-gpu

OCR microservice using MinerU 2.5-Pro on GPU — standalone Web UI + HTTP API for TUAF

0

stars

10

commits

TypeScript

primary language

Jun 11, 2026

updated

README

tuaf-ocr-gpu

OCR microservice using MinerU 2.5-Pro on GPU server. Standalone HTTP API + Web UI for TUAF University document parsing.

Architecture

┌──────────────────────────────────────────────────┐
│   tuaf-ocr-gpu  (10.64.220.241:5003)             │
│                                                  │
│   ┌──────────────┐    ┌──────────────────┐       │
│   │  FastAPI     │    │  Web UI (Vite)   │       │
│   │  /parse      │    │  /  upload+view  │       │
│   │  /health     │    └──────────────────┘       │
│   └──────┬───────┘                               │
│          │                                       │
│   ┌──────▼─────────────┐                         │
│   │  MinerU 2.5-Pro    │                         │
│   │  VLM mode, CUDA 12 │                         │
│   │  ~3-5GB VRAM       │                         │
│   └────────────────────┘                         │
└──────────────────────────────────────────────────┘
  • Engine: MinerU 3.1.15 (locked, top OmniDocBench v1.6 #1)
  • GPU: RTX 2070 SUPER 8GB
  • Repo: xuanhoatrieu/tuaf-ocr-gpu (Private)

Deploy

Prerequisites (GPU server)

  • Docker 29+
  • Docker Compose v2.30+
  • NVIDIA driver 525+, CUDA 12 capable GPU
  • nvidia-container-toolkit

First deploy

# On GPU server (10.64.220.241):
cd ~/tuaf-ocr-gpu
git pull
cp .env.example .env
# edit .env to set OCR_GPU_API_KEY
docker compose up -d --build
docker logs -f tuaf-ocr-gpu  # watch model download (~5GB first time)

Test

Health check (local on GPU server)

curl http://localhost:5003/health

Parse PDF (cross-network from app server)

curl -X POST http://10.64.220.241:5003/parse \
  -H "X-Api-Key: $OCR_GPU_API_KEY" \
  -F "file=@quyche-mau.pdf" \
  -o result.json
jq -r .markdown result.json | head -50

Web UI

Open http://10.64.220.241:5003/ in browser.

Workflow (development)

This repo follows Workflow A — code on dev box, deploy to GPU box.

# Dev box (10.64.11.109):
cd /home/moodle/tuaf-ocr-gpu
# edit code
git add . && git commit -m "..." && git push

# GPU box (10.64.220.241):
ssh tuaf-gpu 'cd tuaf-ocr-gpu && git pull && docker compose up -d --build'

Troubleshooting

  • VRAM OOM: switch MINERU_BACKEND=hybrid in .env (uses 2-4GB)
  • Model download slow: pre-download to models/ volume
  • Vietnamese garbled: try lang=mixed in /parse params
  • Port 5003 blocked: check firewall sudo ufw allow 5003/tcp

Version

ComponentVersionLock reason
MinerU3.1.15Issue #4696 path breakage on auto-upgrade
CUDA12Match GPU driver 535+

License

MinerU uses a custom license based on Apache 2.0. See LICENSE.MinerU for details. This repo (configuration, UI, deployment scripts) is owned by TUAF.

Contributors

xuanhoatrieu

10 commits

xuanhoatrieu/tuaf-ocr-gpu

OCR microservice using MinerU 2.5-Pro on GPU — standalone Web UI + HTTP API for TUAF

0

stars

10

commits

TypeScript

primary language

Jun 11, 2026

updated

README

tuaf-ocr-gpu

OCR microservice using MinerU 2.5-Pro on GPU server. Standalone HTTP API + Web UI for TUAF University document parsing.

Architecture

┌──────────────────────────────────────────────────┐
│   tuaf-ocr-gpu  (10.64.220.241:5003)             │
│                                                  │
│   ┌──────────────┐    ┌──────────────────┐       │
│   │  FastAPI     │    │  Web UI (Vite)   │       │
│   │  /parse      │    │  /  upload+view  │       │
│   │  /health     │    └──────────────────┘       │
│   └──────┬───────┘                               │
│          │                                       │
│   ┌──────▼─────────────┐                         │
│   │  MinerU 2.5-Pro    │                         │
│   │  VLM mode, CUDA 12 │                         │
│   │  ~3-5GB VRAM       │                         │
│   └────────────────────┘                         │
└──────────────────────────────────────────────────┘
  • Engine: MinerU 3.1.15 (locked, top OmniDocBench v1.6 #1)
  • GPU: RTX 2070 SUPER 8GB
  • Repo: xuanhoatrieu/tuaf-ocr-gpu (Private)

Deploy

Prerequisites (GPU server)

  • Docker 29+
  • Docker Compose v2.30+
  • NVIDIA driver 525+, CUDA 12 capable GPU
  • nvidia-container-toolkit

First deploy

# On GPU server (10.64.220.241):
cd ~/tuaf-ocr-gpu
git pull
cp .env.example .env
# edit .env to set OCR_GPU_API_KEY
docker compose up -d --build
docker logs -f tuaf-ocr-gpu  # watch model download (~5GB first time)

Test

Health check (local on GPU server)

curl http://localhost:5003/health

Parse PDF (cross-network from app server)

curl -X POST http://10.64.220.241:5003/parse \
  -H "X-Api-Key: $OCR_GPU_API_KEY" \
  -F "file=@quyche-mau.pdf" \
  -o result.json
jq -r .markdown result.json | head -50

Web UI

Open http://10.64.220.241:5003/ in browser.

Workflow (development)

This repo follows Workflow A — code on dev box, deploy to GPU box.

# Dev box (10.64.11.109):
cd /home/moodle/tuaf-ocr-gpu
# edit code
git add . && git commit -m "..." && git push

# GPU box (10.64.220.241):
ssh tuaf-gpu 'cd tuaf-ocr-gpu && git pull && docker compose up -d --build'

Troubleshooting

  • VRAM OOM: switch MINERU_BACKEND=hybrid in .env (uses 2-4GB)
  • Model download slow: pre-download to models/ volume
  • Vietnamese garbled: try lang=mixed in /parse params
  • Port 5003 blocked: check firewall sudo ufw allow 5003/tcp

Version

ComponentVersionLock reason
MinerU3.1.15Issue #4696 path breakage on auto-upgrade
CUDA12Match GPU driver 535+

License

MinerU uses a custom license based on Apache 2.0. See LICENSE.MinerU for details. This repo (configuration, UI, deployment scripts) is owned by TUAF.

Contributors

xuanhoatrieu

10 commits

Languages

TypeScript

72.1%

Python

21.0%

Shell

3.2%

Dockerfile

2.2%

CSS

1.0%