Skip to content

Fast, accurate OCR with correctness assessment.

2.8 KB
Raw Blame
[project]
name = "minicpm-ocr-environments"
version = "0.1.0"
description = "MiniCPM-OCR SDK and inference environments"
requires-python = ">=3.11,<3.14"
dependencies = ["huggingface-hub>=1.0"]

[project.optional-dependencies]
sdk-cpu = [
    "minicpm-ocr[all]",
    "paddlepaddle==3.2.1",
    "paddlex==3.4.2",
    "pypdfium2>=4",
]
sdk-gpu = [
    "minicpm-ocr[all]",
    "paddlepaddle-gpu==3.3.0",
    "paddlex==3.4.2",
    "pypdfium2>=4",
]
transformers = [
    "torch==2.14.0",
    "torchvision==0.29.0",
    "transformers",
    "accelerate",
]
transformers-server = ["transformers[serving]"]
# Install build dependencies before configuring CUDA and compiling vLLM.
vllm-build = [
    "torch==2.14.0",
    "torchvision==0.29.0",
    "setuptools>=77.0.3,<81",
    "setuptools-rust>=1.9.0",
    "setuptools-scm>=8",
    "cmake>=3.26.1",
    "ninja",
    "packaging",
    "wheel",
    "jinja2",
    "nvidia-cuda-nvcc==13.0.48",
    "nvidia-cuda-crt==13.0.48",
    "nvidia-nvvm==13.0.48",
    "nvidia-cuda-runtime==13.0.96",
    "nvidia-cuda-nvrtc==13.0.88",
    "nvidia-nvjitlink==13.4.92",
    "nvidia-cuda-cccl==13.3.4.3.1",
]
vllm = ["vllm", "transformers"]
sglang = [
    "sglang",
    "nvidia-cuda-nvcc==13.0.48",
    "nvidia-cuda-crt==13.0.48",
    "nvidia-nvvm==13.0.48",
    "nvidia-cuda-runtime==13.0.96",
    "nvidia-cuda-nvrtc==13.0.88",
    "nvidia-nvjitlink==13.4.92",
    "nvidia-cuda-cccl==13.3.4.3.1",
]
modelscope = ["modelscope"]

[tool.uv]
package = false

# Local source checkouts used by the installation profiles.
[tool.uv.sources]
minicpm-ocr = { path = "sdk", editable = true }
transformers = [
    { path = "sources/transformers", editable = true, extra = "transformers" },
    { path = "sources/transformers", editable = true, extra = "transformers-server" },
    { path = "sources/transformers", editable = true, extra = "vllm" },
]
vllm = { path = "sources/vllm", editable = true }
sglang = { path = "sources/sglang/python", editable = true }
paddlepaddle-gpu = { index = "paddle-cu129" }

[[tool.uv.index]]
name = "paddle-cu129"
url = "https://www.paddlepaddle.org.cn/packages/stable/cu129/"
explicit = true

# Fixed source revisions fetched by `bash scripts/install.sh vllm`.
[tool.minicpm-ocr.sources.vllm]
repository = "https://github.com/vllm-project/vllm.git"
commit = "fa3b9d1377219247060d3c8b49eae199c9e7e154"

[tool.minicpm-ocr.sources.transformers]
repository = "https://github.com/huggingface/transformers.git"
commit = "144ecf007b8b4f2910da104c84a79801db6985a6"

# The pip NVCC wheel omits bin/crt; use the matching NVIDIA redistribution.
[tool.minicpm-ocr.cuda-nvcc]
url = "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvcc/linux-x86_64/cuda_nvcc-linux-x86_64-13.0.48-archive.tar.xz"
sha256 = "cc5ff4a00d3be7c6c86ff740de7672e142ec87fea74e7e46b1b142b59fd2ac51"