pip install --upgrade pip
pip install uv
uv pip install -U "mineru[core]"
git clone https://github.com/opendatalab/MinerU.git
cd MinerU
uv pip install -e .[core]
[!NOTE]
Linux and macOS systems automatically support CUDA/MPS acceleration after installation. For Windows users who want to use CUDA acceleration, please visit the PyTorch official website to install PyTorch with the appropriate CUDA version.
If you need to use sglang to accelerate VLM model inference, you can choose any of the following methods to install the full version:
Install using uv or pip:
uv pip install -U "mineru[all]"
Install from source:
uv pip install -e .[all]
[!TIP]
If any exceptions occur during the installation ofsglang, please refer to the official sglang documentation for troubleshooting and solutions, or directly use Docker-based installation.
Build image using Dockerfile:
wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/global/Dockerfile
docker build -t mineru-sglang:latest -f Dockerfile .
Start Docker container:
docker run --gpus all \
--shm-size 32g \
-p 30000:30000 \
--ipc=host \
mineru-sglang:latest \
mineru-sglang-server --host 0.0.0.0 --port 30000
Or start using Docker Compose:
wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/compose.yaml
docker compose -f compose.yaml up -d
[!TIP] The Dockerfile uses
lmsysorg/sglang:v0.4.8.post1-cu126as the default base image, which supports the Turing/Ampere/Ada Lovelace/Hopper platforms.
If you are using the newer Blackwell platform, please change the base image tolmsysorg/sglang:v0.4.8.post1-cu128-b200.
uv pip install -U mineru
mineru -p <input_path> -o <output_path> -b vlm-sglang-client -u http://<host_ip>:<port>