Paddle ocr gpu support. #4

Merged
Seryusjj merged 40 commits from gpu_support into main 2026-01-19 17:35:25 +00:00
Showing only changes of commit ade3627804 - Show all commits

View File

@@ -25,10 +25,15 @@ jobs:
echo "Version: 1.0.${{ gitea.run_number }}" >> $GITHUB_STEP_SUMMARY echo "Version: 1.0.${{ gitea.run_number }}" >> $GITHUB_STEP_SUMMARY
echo "Event: ${{ gitea.event_name }}" >> $GITHUB_STEP_SUMMARY echo "Event: ${{ gitea.event_name }}" >> $GITHUB_STEP_SUMMARY
# CPU image: Multi-arch (amd64 + arm64) # CPU image: Matrix build for amd64 and arm64 (each pushes as soon as done)
build_cpu: build_cpu:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: essential needs: essential
strategy:
matrix:
platform:
- linux/amd64
- linux/arm64
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -46,16 +51,25 @@ jobs:
username: username username: username
password: ${{ secrets.UNIR_REGISTRY_TOKEN }} password: ${{ secrets.UNIR_REGISTRY_TOKEN }}
- name: Build and push CPU image (multi-arch) - name: Get arch suffix
id: arch
run: |
if [ "${{ matrix.platform }}" = "linux/amd64" ]; then
echo "suffix=amd64" >> $GITHUB_OUTPUT
else
echo "suffix=arm64" >> $GITHUB_OUTPUT
fi
- name: Build and push CPU image (${{ matrix.platform }})
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: src/paddle_ocr context: src/paddle_ocr
file: src/paddle_ocr/Dockerfile.cpu file: src/paddle_ocr/Dockerfile.cpu
platforms: linux/amd64,linux/arm64 platforms: ${{ matrix.platform }}
push: true push: true
tags: | tags: |
${{ needs.essential.outputs.image_cpu }}:${{ needs.essential.outputs.Version }} ${{ needs.essential.outputs.image_cpu }}:${{ needs.essential.outputs.Version }}-${{ steps.arch.outputs.suffix }}
${{ needs.essential.outputs.image_cpu }}:latest ${{ needs.essential.outputs.image_cpu }}:${{ steps.arch.outputs.suffix }}
# GPU image: x86_64 only (PaddlePaddle GPU doesn't support ARM64) # GPU image: x86_64 only (PaddlePaddle GPU doesn't support ARM64)
build_gpu: build_gpu: