Skip to content
Draft

vl 1.8 #18444

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
be91b2e
Support PaddleOCR-VL 1.8 in the Python API and CLI
scyyh11 Nov 10, 2026
f92615f
Require PaddleX 3.8 for PaddleOCR
scyyh11 Nov 10, 2026
08bc601
Align PaddleOCR-VL Docker deployment with 1.8
scyyh11 Nov 10, 2026
4f994d1
Expose per-call layout deformation options in PaddleOCR-VL
scyyh11 Nov 10, 2026
77437a8
Allow PaddleOCR-VL 1.8 for local MCP inference
scyyh11 Nov 10, 2026
fcce1ce
Default PaddleOCR-VL to pipeline version 1.8
scyyh11 Nov 10, 2026
50646fa
Support local PaddleOCR-VL 1.8 in document parsing skill
scyyh11 Nov 10, 2026
d9a7f36
Align PaddleOCR-VL Compose examples with 1.8
scyyh11 Nov 10, 2026
d3ff591
Allow PaddleOCR-VL 1.8 for self-hosted MCP
scyyh11 Nov 10, 2026
a110bfc
Validate the PaddleX test wheel version before GPU CI
scyyh11 Nov 10, 2026
6abdcd0
Unify NVIDIA vLLM images for PaddleOCR-VL
scyyh11 Nov 11, 2026
fa7f1b8
Use an x86-64 example for NVIDIA vLLM builds
scyyh11 Nov 11, 2026
0bd5504
Raise the minimum Python version to 3.9
scyyh11 Nov 12, 2026
bba8929
Sync Python support in localized docs
scyyh11 Nov 12, 2026
99b6dde
Let Albumentations select its Albucore dependency
scyyh11 Nov 12, 2026
7fee4fb
Refresh CI with the configured PaddleX test wheel
scyyh11 Nov 12, 2026
bd04e3e
Fix PaddleOCR-VL 1.8 deployment quickstarts
scyyh11 Nov 13, 2026
38ab239
Resolve 3.8 release wheels in NVIDIA pipeline builds
scyyh11 Nov 13, 2026
c58c1b3
Clarify PaddleOCR-VL 1.8 Compose networking
scyyh11 Nov 13, 2026
f71e38c
Match accelerator Compose examples to VLM health ports
scyyh11 Nov 13, 2026
2f651cf
Use vLLM 0.19.0 for PaddleOCR-VL NVIDIA serving
scyyh11 Nov 13, 2026
888b12d
Align SM120 Compose with the shared vLLM 0.19.0 images
scyyh11 Nov 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions .github/workflows/test_gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,25 @@ jobs:
- uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Build PaddleX wheel
- name: Prepare PaddleX wheel
env:
PADDLEX_TEST_WHEEL: ${{ vars.PADDLEX_TEST_WHEEL }}
run: |
PADDLEX_SERIES=$(grep -oE 'paddlex\[[^]]+\]>=[0-9]+\.[0-9]+' pyproject.toml | head -1 | grep -oE '[0-9]+\.[0-9]+') || PADDLEX_SERIES=""
if [ -z "$PADDLEX_SERIES" ]; then
echo "Failed to determine PaddleX version requirement from pyproject.toml" >&2
PADDLEX_REQUIREMENT=$(sed -nE 's/^[[:space:]]*"paddlex\[ocr-core\]([^"]+)".*/paddlex\1/p' pyproject.toml)
if [ -z "$PADDLEX_REQUIREMENT" ]; then
echo "Failed to determine the PaddleX dependency from pyproject.toml" >&2
exit 1
fi
PADDLEX_BRANCH="release/${PADDLEX_SERIES}"
echo "Building PaddleX from branch: ${PADDLEX_BRANCH}"
python -m pip wheel --no-deps --wheel-dir paddlex-wheel "paddlex@git+https://github.com/PaddlePaddle/PaddleX.git@${PADDLEX_BRANCH}"
PADDLEX_SOURCE="${PADDLEX_TEST_WHEEL}"
if [ -z "$PADDLEX_SOURCE" ]; then
PADDLEX_SERIES=$(printf '%s\n' "$PADDLEX_REQUIREMENT" | sed -nE 's/^paddlex>=([0-9]+\.[0-9]+).*/\1/p')
if [ -z "$PADDLEX_SERIES" ]; then
echo "Failed to determine PaddleX version requirement from pyproject.toml" >&2
exit 1
fi
PADDLEX_SOURCE="paddlex@git+https://github.com/PaddlePaddle/PaddleX.git@release/${PADDLEX_SERIES}"
fi
python -m pip wheel --no-deps --wheel-dir paddlex-wheel "$PADDLEX_SOURCE" "$PADDLEX_REQUIREMENT"
- uses: actions/upload-artifact@v4
with:
name: paddlex-wheel
Expand Down
44 changes: 16 additions & 28 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ jobs:
uses: ./.github/actions/detect-docs-only

test-pr-python:
runs-on: ubuntu-latest
# setup-python provides Python 3.9 on Ubuntu 24.04.
runs-on: ubuntu-24.04
needs: detect-changes
if: needs.detect-changes.outputs.docs_only != 'true'
strategy:
matrix:
python-version: ["3.8", "3.9", "3.13"]
python-version: ["3.9", "3.13"]

steps:
- uses: actions/checkout@v6
Expand All @@ -48,39 +49,26 @@ jobs:
${{ runner.os }}-dependencies-

- name: Install dependencies
env:
PADDLEX_TEST_WHEEL: ${{ vars.PADDLEX_TEST_WHEEL }}
run: |
python -m pip install --upgrade pip
pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# On py3.8 several paddlex transitive deps require py3.9+, so only
# paddleocr[doc2md] is installable. See installation.md for the
# supported extras-by-Python-version matrix.
if [[ "${{ matrix.python-version }}" == "3.8" ]]; then
python -m pip install paddlepaddle==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
PADDLEOCR_EXTRAS="[doc2md]"
else
python -m pip install paddlepaddle==3.1.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
PADDLEOCR_EXTRAS="[all]"
fi
PADDLEX_SERIES=$(grep -oE 'paddlex\[[^]]+\]>=[0-9]+\.[0-9]+' pyproject.toml | head -1 | grep -oE '[0-9]+\.[0-9]+')
if [ -z "$PADDLEX_SERIES" ]; then
echo "Failed to determine PaddleX version requirement from pyproject.toml" >&2
exit 1
python -m pip install paddlepaddle==3.1.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
PADDLEX_SOURCE="${PADDLEX_TEST_WHEEL}"
if [ -z "$PADDLEX_SOURCE" ]; then
PADDLEX_SERIES=$(grep -oE 'paddlex\[[^]]+\]>=[0-9]+\.[0-9]+' pyproject.toml | head -1 | grep -oE '[0-9]+\.[0-9]+')
if [ -z "$PADDLEX_SERIES" ]; then
echo "Failed to determine PaddleX version requirement from pyproject.toml" >&2
exit 1
fi
PADDLEX_SOURCE="paddlex@git+https://github.com/PaddlePaddle/PaddleX.git@release/${PADDLEX_SERIES}"
fi

python -m pip install "paddlex>=3.7.0,<3.8.0"
PADDLEX_BRANCH="release/${PADDLEX_SERIES}"
echo "Installing PaddleX from branch: ${PADDLEX_BRANCH}"
python -m pip install -e ".${PADDLEOCR_EXTRAS}" "paddlex@git+https://github.com/PaddlePaddle/PaddleX.git@${PADDLEX_BRANCH}"
python -m pip install -e ".[all]" "$PADDLEX_SOURCE"
python -c "import paddlex; print(f'Installed paddlex version: {paddlex.__version__}')"
- name: Test with pytest
run: |
# Skip py38_incompatible tests on py3.8.
if [[ "${{ matrix.python-version }}" == "3.8" ]]; then
pytest --verbose tests/ -m "not resource_intensive and not py38_incompatible"
else
pytest --verbose tests/
fi
run: pytest --verbose tests/

# Aggregator: produces a single check named `test-pr` so branch protection
# (which requires the literal context `test-pr`) is satisfied. Without this,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ English | [简体中文](./readme/README_cn.md) | [繁體中文](./readme/README

[![PyPI Downloads](https://static.pepy.tech/badge/paddleocr)](https://pepy.tech/projects/paddleocr)
[![Used by](https://img.shields.io/badge/Used%20by-6k%2B%20repositories-blue)](https://github.com/PaddlePaddle/PaddleOCR/network/dependents)
![python](https://img.shields.io/badge/python-3.8~3.12-aff.svg)
![python](https://img.shields.io/badge/python-3.9~3.13-aff.svg)
![os](https://img.shields.io/badge/os-linux%2C%20win%2C%20mac-pink.svg)
![hardware](https://img.shields.io/badge/hardware-cpu%2C%20gpu%2C%20xpu%2C%20npu-yellow.svg)

Expand Down
8 changes: 8 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ At minimum, this should include:
- Required tests, builds, packaging, and regression checks have passed
- Release notes are ready

If the matching PaddleX release branch cannot yet provide a wheel that satisfies the dependency in `pyproject.toml`, build a test wheel from the intended PaddleX commit. Use the stable target version when building from an untagged commit. For example, for 3.8.0, run this in the PaddleX checkout:

```bash
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PADDLEX=3.8.0 python -m pip wheel --no-deps --wheel-dir dist .
```

Set the `PADDLEX_TEST_WHEEL` Actions repository variable to a URL where both CPU and GPU CI can download the wheel. Development and release candidate versions such as `3.8.0.devN` and `3.8.0rc0` do not satisfy `paddlex>=3.8.0`. Clear the override once the matching PaddleX release branch builds a compatible version.

### 5. Create the official tag

Once the release is ready, create the official tag on `release/X.Y`:
Expand Down
8 changes: 8 additions & 0 deletions RELEASING_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@
- 必要的测试、构建、打包和回归通过
- 发布说明已经准备好

如果对应的 PaddleX 发布分支还无法产出满足 `pyproject.toml` 依赖的 wheel,从本次发版指定的 PaddleX 提交构建测试 wheel。用未打标签的提交构建时,显式指定目标正式版本。例如,发 3.8.0 时在 PaddleX 检出目录运行以下命令。

```bash
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PADDLEX=3.8.0 python -m pip wheel --no-deps --wheel-dir dist .
```

将 Actions 仓库变量 `PADDLEX_TEST_WHEEL` 设置为 CPU 和 GPU CI 均可访问的 wheel 下载地址。`3.8.0.devN` 和 `3.8.0rc0` 都不满足 `paddlex>=3.8.0`。对应的 PaddleX 发布分支能构建兼容版本后,清除该变量。

### 5. 打正式标签

确认版本 ready 后,在 `release/X.Y` 分支上打正式标签:
Expand Down
6 changes: 3 additions & 3 deletions deploy/paddleocr_vl_docker/accelerators/amd-gpu/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
paddleocr-vl-api:
image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleocr-vl:${API_IMAGE_TAG_SUFFIX}
image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleocr-vl:${API_IMAGE_TAG_SUFFIX:-paddleocr3.8-amd-gpu}
container_name: paddleocr-vl-api
ports:
- 8080:8080
Expand All @@ -22,12 +22,12 @@ services:
restart: unless-stopped
environment:
- VLM_BACKEND=${VLM_BACKEND:-vllm}
command: /bin/bash -c "paddlex --serve --pipeline /home/paddleocr/pipeline_config_${VLM_BACKEND}.yaml"
command: /bin/bash -c "paddlex --serve --pipeline /home/paddleocr/pipeline_config_${VLM_BACKEND:-vllm}.yaml"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"]

paddleocr-vlm-server:
image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleocr-genai-${VLM_BACKEND}-server:${VLM_IMAGE_TAG_SUFFIX}
image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleocr-genai-${VLM_BACKEND:-vllm}-server:${VLM_IMAGE_TAG_SUFFIX:-paddleocr3.8-amd-gpu}
container_name: paddleocr-vlm-server
devices:
- /dev/kfd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ RUN apt-get update \
&& fc-cache -fv \
&& rm -rf /var/lib/apt/lists/*

ARG PADDLEOCR_VERSION=">=3.4.0,<3.5"
ARG PADDLEX_VERSION=">=3.4.0,<3.5"
ARG PADDLEOCR_VERSION=">=3.8.0,<3.9.0"
ARG PADDLEX_VERSION=">=3.8.0,<3.9.0"
RUN --mount=type=cache,target=/root/.cache/pip \
python -m pip install "paddleocr[doc-parser]${PADDLEOCR_VERSION}" "paddlex[serving]${PADDLEX_VERSION}"

Expand All @@ -38,17 +38,17 @@ RUN if [ "${BUILD_FOR_OFFLINE}" = 'true' ]; then \
&& cd "${HOME}/.paddlex/official_models" \
&& wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/UVDoc_infer.tar \
https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-LCNet_x1_0_doc_ori_infer.tar \
https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-DocLayoutV3_infer.tar \
https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PaddleOCR-VL-1.6_infer.tar \
https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-DocLayoutV4_infer.tar \
https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PaddleOCR-VL-1.8_infer.tar \
&& tar -xf UVDoc_infer.tar \
&& mv UVDoc_infer UVDoc \
&& tar -xf PP-LCNet_x1_0_doc_ori_infer.tar \
&& mv PP-LCNet_x1_0_doc_ori_infer PP-LCNet_x1_0_doc_ori \
&& tar -xf PP-DocLayoutV3_infer.tar \
&& mv PP-DocLayoutV3_infer PP-DocLayoutV3 \
&& tar -xf PaddleOCR-VL-1.6_infer.tar \
&& mv PaddleOCR-VL-1.6_infer PaddleOCR-VL-1.6 \
&& rm -f UVDoc_infer.tar PP-LCNet_x1_0_doc_ori_infer.tar PP-DocLayoutV3_infer.tar PaddleOCR-VL-1.6_infer.tar \
&& tar -xf PP-DocLayoutV4_infer.tar \
&& mv PP-DocLayoutV4_infer PP-DocLayoutV4 \
&& tar -xf PaddleOCR-VL-1.8_infer.tar \
&& mv PaddleOCR-VL-1.8_infer PaddleOCR-VL-1.8 \
&& rm -f UVDoc_infer.tar PP-LCNet_x1_0_doc_ori_infer.tar PP-DocLayoutV4_infer.tar PaddleOCR-VL-1.8_infer.tar \
&& mkdir -p "${HOME}/.paddlex/fonts" \
&& wget -P "${HOME}/.paddlex/fonts" https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/fonts/PingFang-SC-Regular.ttf; \
fi
Expand Down
14 changes: 7 additions & 7 deletions deploy/paddleocr_vl_docker/accelerators/amd-gpu/vlm.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ FROM rocm/vllm-dev:nightly_main_20260125 AS base-vllm

FROM base-${BACKEND}

ARG PADDLEOCR_VERSION=">=3.4.0,<3.5"
ARG PADDLEX_VERSION=">=3.4.0,<3.5"
ARG PADDLEOCR_VERSION=">=3.8.0,<3.9.0"
ARG PADDLEX_VERSION=">=3.8.0,<3.9.0"
RUN --mount=type=cache,target=/root/.cache/pip \
python -m pip install "paddleocr${PADDLEOCR_VERSION}" "paddlex${PADDLEX_VERSION}"

Expand All @@ -22,12 +22,12 @@ ARG BUILD_FOR_OFFLINE=false
RUN if [ "${BUILD_FOR_OFFLINE}" = 'true' ]; then \
mkdir -p "${HOME}/.paddlex/official_models" \
&& cd "${HOME}/.paddlex/official_models" \
&& wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PaddleOCR-VL-1.6_infer.tar \
&& tar -xf PaddleOCR-VL-1.6_infer.tar \
&& mv PaddleOCR-VL-1.6_infer PaddleOCR-VL-1.6 \
&& rm -f PaddleOCR-VL-1.6_infer.tar; \
&& wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PaddleOCR-VL-1.8_infer.tar \
&& tar -xf PaddleOCR-VL-1.8_infer.tar \
&& mv PaddleOCR-VL-1.8_infer PaddleOCR-VL-1.8 \
&& rm -f PaddleOCR-VL-1.8_infer.tar; \
fi

ARG BACKEND
ENV BACKEND=${BACKEND}
CMD ["/bin/bash", "-c", "paddleocr genai_server --model_name PaddleOCR-VL-1.6-0.9B --host 0.0.0.0 --port 8080 --backend ${BACKEND}"]
CMD ["/bin/bash", "-c", "paddleocr genai_server --model_name PaddleOCR-VL-1.8-0.9B --host 0.0.0.0 --port 8080 --backend ${BACKEND}"]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
paddleocr-vl-api:
image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleocr-vl:${API_IMAGE_TAG_SUFFIX}
image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleocr-vl:${API_IMAGE_TAG_SUFFIX:-paddleocr3.8-huawei-npu}
container_name: paddleocr-vl-api
ports:
- 8080:8080
Expand All @@ -11,7 +11,7 @@ services:
restart: unless-stopped
environment:
- VLM_BACKEND=${VLM_BACKEND:-vllm}
command: /bin/bash -c "paddlex --serve --pipeline /home/paddleocr/pipeline_config_${VLM_BACKEND}.yaml --device npu"
command: /bin/bash -c "paddlex --serve --pipeline /home/paddleocr/pipeline_config_${VLM_BACKEND:-vllm}.yaml --device npu"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"]
volumes:
Expand All @@ -22,7 +22,7 @@ services:
shm_size: 64g

paddleocr-vlm-server:
image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleocr-genai-${VLM_BACKEND}-server:${VLM_IMAGE_TAG_SUFFIX}
image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleocr-genai-${VLM_BACKEND:-vllm}-server:${VLM_IMAGE_TAG_SUFFIX:-paddleocr3.8-huawei-npu}
container_name: paddleocr-vlm-server
user: root
restart: unless-stopped
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ RUN --mount=type=cache,id=pip-${TARGETARCH},target=/root/.cache/pip \
python -m pip install paddlepaddle==3.2.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/ \
&& python -m pip install paddle-custom-npu==3.2.0 -i https://www.paddlepaddle.org.cn/packages/stable/npu/

ARG PADDLEOCR_VERSION=">=3.4.0,<3.5"
ARG PADDLEX_VERSION=">=3.4.0,<3.5"
ARG PADDLEOCR_VERSION=">=3.8.0,<3.9.0"
ARG PADDLEX_VERSION=">=3.8.0,<3.9.0"
RUN --mount=type=cache,id=pip-${TARGETARCH},target=/root/.cache/pip \
python -m pip install "paddleocr[doc-parser]${PADDLEOCR_VERSION}" "paddlex[serving]${PADDLEX_VERSION}"

Expand Down Expand Up @@ -101,17 +101,17 @@ RUN if [ "${BUILD_FOR_OFFLINE}" = 'true' ]; then \
&& cd "${HOME}/.paddlex/official_models" \
&& wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/UVDoc_infer.tar \
https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-LCNet_x1_0_doc_ori_infer.tar \
https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-DocLayoutV3_infer.tar \
https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PaddleOCR-VL-1.6_infer.tar \
https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-DocLayoutV4_infer.tar \
https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PaddleOCR-VL-1.8_infer.tar \
&& tar -xf UVDoc_infer.tar \
&& mv UVDoc_infer UVDoc \
&& tar -xf PP-LCNet_x1_0_doc_ori_infer.tar \
&& mv PP-LCNet_x1_0_doc_ori_infer PP-LCNet_x1_0_doc_ori \
&& tar -xf PP-DocLayoutV3_infer.tar \
&& mv PP-DocLayoutV3_infer PP-DocLayoutV3 \
&& tar -xf PaddleOCR-VL-1.6_infer.tar \
&& mv PaddleOCR-VL-1.6_infer PaddleOCR-VL-1.6 \
&& rm -f UVDoc_infer.tar PP-LCNet_x1_0_doc_ori_infer.tar PP-DocLayoutV3_infer.tar PaddleOCR-VL-1.6_infer.tar \
&& tar -xf PP-DocLayoutV4_infer.tar \
&& mv PP-DocLayoutV4_infer PP-DocLayoutV4 \
&& tar -xf PaddleOCR-VL-1.8_infer.tar \
&& mv PaddleOCR-VL-1.8_infer PaddleOCR-VL-1.8 \
&& rm -f UVDoc_infer.tar PP-LCNet_x1_0_doc_ori_infer.tar PP-DocLayoutV4_infer.tar PaddleOCR-VL-1.8_infer.tar \
&& mkdir -p "${HOME}/.paddlex/fonts" \
&& wget -P "${HOME}/.paddlex/fonts" https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/fonts/PingFang-SC-Regular.ttf; \
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ RUN apt-get update \
&& apt-get install -y libgl1 \
&& rm -rf /var/lib/apt/lists/*

ARG PADDLEOCR_VERSION=">=3.4.0,<3.5"
ARG PADDLEX_VERSION=">=3.4.0,<3.5"
ARG PADDLEOCR_VERSION=">=3.8.0,<3.9.0"
ARG PADDLEX_VERSION=">=3.8.0,<3.9.0"
RUN --mount=type=cache,target=/root/.cache/pip \
python -m pip install "paddleocr${PADDLEOCR_VERSION}" "paddlex${PADDLEX_VERSION}"

Expand All @@ -28,12 +28,12 @@ ARG BUILD_FOR_OFFLINE=false
RUN if [ "${BUILD_FOR_OFFLINE}" = 'true' ]; then \
mkdir -p "${HOME}/.paddlex/official_models" \
&& cd "${HOME}/.paddlex/official_models" \
&& wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PaddleOCR-VL-1.6_infer.tar \
&& tar -xf PaddleOCR-VL-1.6_infer.tar \
&& mv PaddleOCR-VL-1.6_infer PaddleOCR-VL-1.6 \
&& rm -f PaddleOCR-VL-1.6_infer.tar; \
&& wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PaddleOCR-VL-1.8_infer.tar \
&& tar -xf PaddleOCR-VL-1.8_infer.tar \
&& mv PaddleOCR-VL-1.8_infer PaddleOCR-VL-1.8 \
&& rm -f PaddleOCR-VL-1.8_infer.tar; \
fi

ARG BACKEND
ENV BACKEND=${BACKEND}
CMD ["/bin/bash", "-c", "paddleocr genai_server --model_name PaddleOCR-VL-1.6-0.9B --host 0.0.0.0 --port 8080 --backend ${BACKEND}"]
CMD ["/bin/bash", "-c", "paddleocr genai_server --model_name PaddleOCR-VL-1.8-0.9B --host 0.0.0.0 --port 8080 --backend ${BACKEND}"]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
paddleocr-vl-api:
image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleocr-vl:${API_IMAGE_TAG_SUFFIX}
image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleocr-vl:${API_IMAGE_TAG_SUFFIX:-paddleocr3.8-hygon-dcu}
container_name: paddleocr-vl-api
ports:
- 8080:8080
Expand All @@ -22,15 +22,15 @@ services:
restart: unless-stopped
environment:
- VLM_BACKEND=${VLM_BACKEND:-vllm}
command: paddlex --serve --pipeline /home/paddleocr/pipeline_config_${VLM_BACKEND}.yaml --device dcu
command: paddlex --serve --pipeline /home/paddleocr/pipeline_config_${VLM_BACKEND:-vllm}.yaml --device dcu
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"]
volumes:
- /opt/hyhal/:/opt/hyhal/:ro
shm_size: 64g

paddleocr-vlm-server:
image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleocr-genai-${VLM_BACKEND}-server:${VLM_IMAGE_TAG_SUFFIX}
image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleocr-genai-${VLM_BACKEND:-vllm}-server:${VLM_IMAGE_TAG_SUFFIX:-paddleocr3.8-hygon-dcu}
container_name: paddleocr-vlm-server
user: root
privileged: true
Expand Down
Loading
Loading