From 583a9ee6aced7621685ed24eea4973e485ff8433 Mon Sep 17 00:00:00 2001 From: myhloli Date: Thu, 28 May 2026 18:12:30 +0800 Subject: [PATCH] chore: update vLLM Docker base image to 0.21.0 --- docker/china/Dockerfile | 10 ++++++---- docker/global/Dockerfile | 10 ++++++---- docs/en/quick_start/docker_deployment.md | 4 ++-- docs/en/quick_start/extension_modules.md | 4 +++- docs/zh/quick_start/docker_deployment.md | 4 ++-- docs/zh/quick_start/extension_modules.md | 4 +++- pyproject.toml | 2 +- 7 files changed, 23 insertions(+), 15 deletions(-) diff --git a/docker/china/Dockerfile b/docker/china/Dockerfile index 2be8b628..00c95c0e 100644 --- a/docker/china/Dockerfile +++ b/docker/china/Dockerfile @@ -1,7 +1,9 @@ -# Use DaoCloud mirrored vllm image for China region for gpu with Volta、Turing、Ampere、Ada Lovelace、Hopper、Blackwell architecture (7.0 <= Compute Capability <= 12.0) +# Use DaoCloud mirrored vllm image for China region for gpu with Volta、Turing、Ampere、Ada Lovelace、Hopper、Blackwell architecture (7.0 <= Compute Capability <= 12.1) +# The default base image uses vLLM 0.21.0 with CUDA 13.0. For CUDA 12.9 environments, switch to the commented cu129 image below. # Compute Capability version query (https://developer.nvidia.com/cuda-gpus) # support x86_64 architecture and ARM(AArch64) architecture -FROM docker.m.daocloud.io/vllm/vllm-openai:v0.11.2 +FROM docker.m.daocloud.io/vllm/vllm-openai:v0.21.0 +# FROM docker.m.daocloud.io/vllm/vllm-openai:v0.21.0-cu129 # Install libgl for opencv support & Noto fonts for Chinese characters RUN apt-get update && \ @@ -15,11 +17,11 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # Install mineru latest -RUN python3 -m pip install -U 'mineru[core]>=3.0.0' -i https://mirrors.aliyun.com/pypi/simple --break-system-packages && \ +RUN python3 -m pip install -U 'mineru[core]>=3.2.1' -i https://mirrors.aliyun.com/pypi/simple --break-system-packages && \ python3 -m pip cache purge # Download models and update the configuration file RUN /bin/bash -c "mineru-models-download -s modelscope -m all" # Set the entry point to activate the virtual environment and run the command line tool -ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"] \ No newline at end of file +ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"] diff --git a/docker/global/Dockerfile b/docker/global/Dockerfile index 5e84399d..f09313ac 100644 --- a/docker/global/Dockerfile +++ b/docker/global/Dockerfile @@ -1,7 +1,9 @@ -# Use the official vllm image for gpu with Volta、Turing、Ampere、Ada Lovelace、Hopper、Blackwell architecture (7.0 <= Compute Capability <= 12.0) +# Use the official vllm image for gpu with Volta、Turing、Ampere、Ada Lovelace、Hopper、Blackwell architecture (7.0 <= Compute Capability <= 12.1) +# The default base image uses vLLM 0.21.0 with CUDA 13.0. For CUDA 12.9 environments, switch to the commented cu129 image below. # Compute Capability version query (https://developer.nvidia.com/cuda-gpus) # support x86_64 architecture and ARM(AArch64) architecture -FROM vllm/vllm-openai:v0.11.2 +FROM vllm/vllm-openai:v0.21.0 +# FROM vllm/vllm-openai:v0.21.0-cu129 # Install libgl for opencv support & Noto fonts for Chinese characters RUN apt-get update && \ @@ -15,11 +17,11 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # Install mineru latest -RUN python3 -m pip install -U 'mineru[core]>=3.0.0' --break-system-packages && \ +RUN python3 -m pip install -U 'mineru[core]>=3.2.1' --break-system-packages && \ python3 -m pip cache purge # Download models and update the configuration file RUN /bin/bash -c "mineru-models-download -s huggingface -m all" # Set the entry point to activate the virtual environment and run the command line tool -ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"] \ No newline at end of file +ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"] diff --git a/docs/en/quick_start/docker_deployment.md b/docs/en/quick_start/docker_deployment.md index 288e6d49..47848515 100644 --- a/docs/en/quick_start/docker_deployment.md +++ b/docs/en/quick_start/docker_deployment.md @@ -15,13 +15,13 @@ docker build -t mineru:latest -f Dockerfile . ## Docker Description -MinerU's Docker uses `vllm/vllm-openai` as the base image, so it includes the `vllm` inference acceleration framework and necessary dependencies by default. Therefore, on compatible devices, you can directly use `vllm` to accelerate VLM model inference. +MinerU's Docker uses `vllm/vllm-openai` as the base image, so it includes the `vllm` inference acceleration framework and necessary dependencies by default. The current Dockerfile uses `vllm/vllm-openai:v0.21.0` by default for CUDA 13.0-compatible environments. If your environment requires a CUDA 12.9-compatible image, comment out the default `FROM` line at the top of the Dockerfile and enable the commented `vllm/vllm-openai:v0.21.0-cu129` base image instead. Therefore, on compatible devices, you can directly use `vllm` to accelerate VLM model inference. > [!NOTE] > Requirements for using `vllm` to accelerate VLM model inference: > > - Device must have Volta architecture or later graphics cards with 8GB+ available VRAM. -> - The host machine's graphics driver should support CUDA 12.9.1 or higher; You can check the driver version using the `nvidia-smi` command. +> - The host machine's graphics driver must support the CUDA runtime used by the selected base image: the default `v0.21.0` image requires a CUDA 13.0-compatible driver, and `v0.21.0-cu129` requires a CUDA 12.9-compatible driver. You can check the driver version using the `nvidia-smi` command. > - Docker container must have access to the host machine's graphics devices. ## Start Docker Container diff --git a/docs/en/quick_start/extension_modules.md b/docs/en/quick_start/extension_modules.md index 32854b6a..daec8c4d 100644 --- a/docs/en/quick_start/extension_modules.md +++ b/docs/en/quick_start/extension_modules.md @@ -29,7 +29,9 @@ The `vllm` module provides acceleration support for VLM model inference, suitabl uv pip install "mineru[core,vllm]" ``` > [!TIP] -> If exceptions occur during installation of the extra package including vllm, please refer to the [vllm official documentation](https://docs.vllm.ai/en/latest/getting_started/installation/index.html) to try to resolve the issue, or directly use the [Docker](./docker_deployment.md) deployment method. +> - Because the `vllm` extra now allows the 0.21 series, the default installation usually resolves to the newer `vllm` version allowed by the current range. Make sure the host GPU driver supports the CUDA runtime required by the installed `vllm` package; the default path requires a CUDA 13.0-compatible driver. +> - If you need a CUDA 12.9-compatible environment, follow the [vllm official documentation](https://docs.vllm.ai/en/latest/getting_started/installation/index.html) to select the matching CUDA installation path, or use the `vllm/vllm-openai:v0.21.0-cu129` base image from the [Docker](./docker_deployment.md) deployment workflow. +> - If exceptions occur during installation of the extra package including vllm, you can also refer to the [vllm official documentation](https://docs.vllm.ai/en/latest/getting_started/installation/index.html) to troubleshoot them. --- diff --git a/docs/zh/quick_start/docker_deployment.md b/docs/zh/quick_start/docker_deployment.md index 5bb4dba4..5b5aa07c 100644 --- a/docs/zh/quick_start/docker_deployment.md +++ b/docs/zh/quick_start/docker_deployment.md @@ -15,12 +15,12 @@ docker build -t mineru:latest -f Dockerfile . ## Docker说明 -Mineru的docker使用了`vllm/vllm-openai`作为基础镜像,因此在docker中默认集成了`vllm`推理加速框架和必需的依赖环境。因此在满足条件的设备上,您可以直接使用`vllm`加速VLM模型推理。 +Mineru的docker使用了`vllm/vllm-openai`作为基础镜像,因此在docker中默认集成了`vllm`推理加速框架和必需的依赖环境。当前国内 Dockerfile 默认使用`docker.m.daocloud.io/vllm/vllm-openai:v0.21.0`,适用于 CUDA 13.0 兼容环境;如果您的环境需要 CUDA 12.9 兼容镜像,请将 Dockerfile 顶部的默认`FROM`注释掉,并启用注释中的`docker.m.daocloud.io/vllm/vllm-openai:v0.21.0-cu129`基础镜像。因此在满足条件的设备上,您可以直接使用`vllm`加速VLM模型推理。 > [!NOTE] > 使用`vllm`加速VLM模型推理需要满足的条件是: > > - 设备包含Volta及以后架构的显卡,且可用显存大于等于8G。 -> - 物理机的显卡驱动应支持CUDA 12.9.1或更高版本,可通过`nvidia-smi`命令检查驱动版本。 +> - 物理机的显卡驱动应支持所选基础镜像对应的 CUDA 运行时版本:默认`v0.21.0`需要 CUDA 13.0 兼容驱动,`v0.21.0-cu129`需要 CUDA 12.9 兼容驱动。可通过`nvidia-smi`命令检查驱动版本。 > - docker中能够访问物理机的显卡设备。 diff --git a/docs/zh/quick_start/extension_modules.md b/docs/zh/quick_start/extension_modules.md index 3d2cb68a..bc150eb6 100644 --- a/docs/zh/quick_start/extension_modules.md +++ b/docs/zh/quick_start/extension_modules.md @@ -28,7 +28,9 @@ uv pip install "mineru[s3]" uv pip install "mineru[core,vllm]" ``` > [!TIP] -> 如在安装包含`vllm`的扩展包过程中发生异常,请参考 [vllm 官方文档](https://docs.vllm.ai/en/latest/getting_started/installation/index.html) 尝试解决,或直接使用 [Docker](./docker_deployment.md) 方式部署镜像。 +> - 由于`vllm`扩展包已放开到 0.21 系列版本,默认安装通常会选择当前允许范围内更高的`vllm`版本。请确保物理机显卡驱动支持所安装`vllm`包对应的 CUDA 运行时,默认路径需要 CUDA 13.0 兼容驱动。 +> - 如需使用 CUDA 12.9 兼容环境,请参考 [vllm 官方文档](https://docs.vllm.ai/en/latest/getting_started/installation/index.html) 选择对应的 CUDA 安装方式,或直接使用 [Docker](./docker_deployment.md) 中的`vllm/vllm-openai:v0.21.0-cu129`基础镜像。 +> - 如在安装包含`vllm`的扩展包过程中发生异常,也可参考 [vllm 官方文档](https://docs.vllm.ai/en/latest/getting_started/installation/index.html) 尝试解决。 --- diff --git a/pyproject.toml b/pyproject.toml index e1ddc34f..b8b05b91 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,7 +77,7 @@ vlm = [ "accelerate>=1.5.1", ] vllm = [ - "vllm>=0.10.1.1,<0.12", + "vllm>=0.10.1.1,<0.22.0", ] lmdeploy = [ "lmdeploy>=0.10.2,<0.12",