ci update
Some checks failed
build_docker / build_cpu (linux/arm64) (pull_request) Has been cancelled
build_docker / build_gpu (linux/amd64) (pull_request) Has been cancelled
build_docker / build_gpu (linux/arm64) (pull_request) Has been cancelled
build_docker / build_cpu (linux/amd64) (pull_request) Has been cancelled
build_docker / essential (push) Successful in 0s
build_docker / build_gpu (linux/amd64) (push) Has been cancelled
build_docker / build_gpu (linux/arm64) (push) Has been cancelled
build_docker / build_cpu (linux/amd64) (push) Has been cancelled
build_docker / build_cpu (linux/arm64) (push) Has been cancelled
build_docker / essential (pull_request) Successful in 1s
Some checks failed
build_docker / build_cpu (linux/arm64) (pull_request) Has been cancelled
build_docker / build_gpu (linux/amd64) (pull_request) Has been cancelled
build_docker / build_gpu (linux/arm64) (pull_request) Has been cancelled
build_docker / build_cpu (linux/amd64) (pull_request) Has been cancelled
build_docker / essential (push) Successful in 0s
build_docker / build_gpu (linux/amd64) (push) Has been cancelled
build_docker / build_gpu (linux/arm64) (push) Has been cancelled
build_docker / build_cpu (linux/amd64) (push) Has been cancelled
build_docker / build_cpu (linux/arm64) (push) Has been cancelled
build_docker / essential (pull_request) Successful in 1s
This commit is contained in:
@@ -9,6 +9,11 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- gpu_support
|
||||
|
||||
env:
|
||||
PADDLE_VERSION: "3.0.0"
|
||||
WHEEL_BASE_URL: "https://seryus.ddns.net/api/packages/unir/generic"
|
||||
|
||||
jobs:
|
||||
essential:
|
||||
@@ -25,7 +30,7 @@ jobs:
|
||||
echo "Version: 1.0.${{ gitea.run_number }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Event: ${{ gitea.event_name }}" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
# CPU image: Matrix build for amd64 and arm64 (each pushes as soon as done)
|
||||
# CPU image: Matrix build for amd64 and arm64
|
||||
build_cpu:
|
||||
runs-on: ubuntu-latest
|
||||
needs: essential
|
||||
@@ -60,6 +65,14 @@ jobs:
|
||||
echo "suffix=arm64" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Download ARM64 wheel from Gitea packages
|
||||
if: matrix.platform == 'linux/arm64'
|
||||
run: |
|
||||
mkdir -p src/paddle_ocr/wheels
|
||||
curl -L -o src/paddle_ocr/wheels/paddlepaddle-${{ env.PADDLE_VERSION }}-cp311-cp311-linux_aarch64.whl \
|
||||
"${{ env.WHEEL_BASE_URL }}/paddlepaddle-cpu-arm64/${{ env.PADDLE_VERSION }}/paddlepaddle-${{ env.PADDLE_VERSION }}-cp311-cp311-linux_aarch64.whl"
|
||||
ls -la src/paddle_ocr/wheels/
|
||||
|
||||
- name: Build and push CPU image (${{ matrix.platform }})
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
@@ -71,29 +84,56 @@ jobs:
|
||||
${{ needs.essential.outputs.image_cpu }}:${{ needs.essential.outputs.Version }}-${{ steps.arch.outputs.suffix }}
|
||||
${{ needs.essential.outputs.image_cpu }}:${{ steps.arch.outputs.suffix }}
|
||||
|
||||
# GPU image: x86_64 only (PaddlePaddle GPU doesn't support ARM64)
|
||||
# GPU image: Matrix build for amd64 and arm64
|
||||
build_gpu:
|
||||
runs-on: ubuntu-latest
|
||||
needs: essential
|
||||
strategy:
|
||||
matrix:
|
||||
platform:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Gitea Registry
|
||||
run: |
|
||||
echo ${{ secrets.CI_READWRITE }} | docker login \
|
||||
-u username \
|
||||
--password-stdin ${{ needs.essential.outputs.repo }}
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ needs.essential.outputs.repo }}
|
||||
username: username
|
||||
password: ${{ secrets.CI_READWRITE }}
|
||||
|
||||
- name: Build GPU image (x86_64)
|
||||
- name: Get arch suffix
|
||||
id: arch
|
||||
run: |
|
||||
docker build \
|
||||
-f src/paddle_ocr/Dockerfile.gpu \
|
||||
-t ${{ needs.essential.outputs.image_gpu }}:${{ needs.essential.outputs.Version }} \
|
||||
-t ${{ needs.essential.outputs.image_gpu }}:latest \
|
||||
src/paddle_ocr/
|
||||
if [ "${{ matrix.platform }}" = "linux/amd64" ]; then
|
||||
echo "suffix=amd64" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "suffix=arm64" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Push GPU image
|
||||
- name: Download ARM64 GPU wheel from Gitea packages
|
||||
if: matrix.platform == 'linux/arm64'
|
||||
run: |
|
||||
docker push ${{ needs.essential.outputs.image_gpu }}:${{ needs.essential.outputs.Version }}
|
||||
docker push ${{ needs.essential.outputs.image_gpu }}:latest
|
||||
mkdir -p src/paddle_ocr/wheels
|
||||
curl -L -o src/paddle_ocr/wheels/paddlepaddle_gpu-${{ env.PADDLE_VERSION }}-cp311-cp311-linux_aarch64.whl \
|
||||
"${{ env.WHEEL_BASE_URL }}/paddlepaddle-gpu-arm64/${{ env.PADDLE_VERSION }}/paddlepaddle_gpu-${{ env.PADDLE_VERSION }}-cp311-cp311-linux_aarch64.whl"
|
||||
ls -la src/paddle_ocr/wheels/
|
||||
|
||||
- name: Build and push GPU image (${{ matrix.platform }})
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: src/paddle_ocr
|
||||
file: src/paddle_ocr/Dockerfile.gpu
|
||||
platforms: ${{ matrix.platform }}
|
||||
push: true
|
||||
tags: |
|
||||
${{ needs.essential.outputs.image_gpu }}:${{ needs.essential.outputs.Version }}-${{ steps.arch.outputs.suffix }}
|
||||
${{ needs.essential.outputs.image_gpu }}:${{ steps.arch.outputs.suffix }}
|
||||
|
||||
Reference in New Issue
Block a user