Skip to content

Commit

Permalink
Test image builds for ARM64 arch in CI (kserve#3629)
Browse files Browse the repository at this point in the history
* Test image builds for ARM64 arch in CI

Signed-off-by: Sivanantham Chinnaiyan <sivanantham.chinnaiyan@ideas2it.com>

* Update lockfiles

Signed-off-by: Sivanantham Chinnaiyan <sivanantham.chinnaiyan@ideas2it.com>

* Add ARM64 support for paddle

Signed-off-by: Sivanantham Chinnaiyan <sivanantham.chinnaiyan@ideas2it.com>

---------

Signed-off-by: Sivanantham Chinnaiyan <sivanantham.chinnaiyan@ideas2it.com>
Signed-off-by: asd981256 <asd981256@gmail.com>
  • Loading branch information
sivanantha321 authored and asd981256 committed May 14, 2024
1 parent 767318d commit 18010f4
Show file tree
Hide file tree
Showing 32 changed files with 316 additions and 225 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/artexplainer-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,24 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Checkout source
uses: actions/checkout@v4

- name: Setup QEMU
uses: docker/setup-qemu-action@v3

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
cd python
docker buildx build . --file artexplainer.Dockerfile
fi
uses: docker/build-push-action@v5
with:
platforms: linux/amd64, linux/arm64/v8
context: python
file: python/artexplainer.Dockerfile
push: false
# https://github.com/docker/buildx/issues/1533
provenance: false

# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
Expand All @@ -49,7 +56,8 @@ jobs:
if: github.event_name == 'push'

steps:
- uses: actions/checkout@v4
- name: Checkout source
uses: actions/checkout@v4

- name: Setup QEMU
uses: docker/setup-qemu-action@v3
Expand Down
52 changes: 32 additions & 20 deletions .github/workflows/custom-model-grpc-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,18 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
cd python
docker buildx build . --file custom_model_grpc.Dockerfile
fi
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
context: python
file: python/custom_model_grpc.Dockerfile
push: false
# https://github.com/docker/buildx/issues/1533
provenance: false

# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
Expand All @@ -49,15 +52,16 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4

- name: Build image
run: |
cd python
docker buildx build . --file custom_model_grpc.Dockerfile --tag $IMAGE_NAME
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log into registry
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Push image
- name: Export version variable
run: |
IMAGE_ID=kserve/$IMAGE_NAME
Expand All @@ -73,8 +77,16 @@ jobs:
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
echo VERSION=$VERSION >> $GITHUB_ENV
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
context: python
file: python/custom_model_grpc.Dockerfile
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}
# https://github.com/docker/buildx/issues/1533
provenance: false
53 changes: 32 additions & 21 deletions .github/workflows/huggingface-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,18 @@ jobs:
- name: Free-up disk space
uses: ./.github/actions/free-up-disk-space

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
cd python
docker buildx build . --file huggingface_server.Dockerfile
fi
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
context: python
file: python/huggingface_server.Dockerfile
push: false
# https://github.com/docker/buildx/issues/1533
provenance: false

# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
Expand All @@ -58,15 +61,16 @@ jobs:
- name: Free-up disk space
uses: ./.github/actions/free-up-disk-space

- name: Build image
run: |
cd python
docker buildx build . --file huggingface_server.Dockerfile --tag $IMAGE_NAME
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log into registry
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Push image
- name: Export version variable
run: |
IMAGE_ID=kserve/$IMAGE_NAME
Expand All @@ -82,9 +86,16 @@ jobs:
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
echo VERSION=$VERSION >> $GITHUB_ENV
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
context: python
file: python/huggingface_server.Dockerfile
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}
# https://github.com/docker/buildx/issues/1533
provenance: false
22 changes: 14 additions & 8 deletions .github/workflows/lightgbm-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,21 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4

- name: Setup QEMU
uses: docker/setup-qemu-action@v3

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
cd python
docker buildx build . --file lgb.Dockerfile
fi
uses: docker/build-push-action@v5
with:
platforms: linux/amd64, linux/arm64/v8
context: python
file: python/lgb.Dockerfile
push: false
# https://github.com/docker/buildx/issues/1533
provenance: false

# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
Expand Down
25 changes: 16 additions & 9 deletions .github/workflows/paddle-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,21 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4

- name: Setup QEMU
uses: docker/setup-qemu-action@v3

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
cd python
docker buildx build . --file paddle.Dockerfile
fi
uses: docker/build-push-action@v5
with:
platforms: linux/amd64, linux/arm64/v8
context: python
file: python/paddle.Dockerfile
push: false
# https://github.com/docker/buildx/issues/1533
provenance: false

# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
Expand Down Expand Up @@ -83,10 +89,11 @@ jobs:
echo VERSION=$VERSION >> $GITHUB_ENV
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
platforms: linux/amd64, linux/arm64/v8
context: python
file: python/paddle.Dockerfile
push: true
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/pmml-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,21 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4

- name: Setup QEMU
uses: docker/setup-qemu-action@v3

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
cd python
docker buildx build . --file pmml.Dockerfile
fi
uses: docker/build-push-action@v5
with:
platforms: linux/amd64, linux/arm64/v8
context: python
file: python/pmml.Dockerfile
push: false
# https://github.com/docker/buildx/issues/1533
provenance: false

# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/sklearnserver-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,21 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4

- name: Setup QEMU
uses: docker/setup-qemu-action@v3

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
cd python
docker buildx build . --file sklearn.Dockerfile
fi
uses: docker/build-push-action@v5
with:
platforms: linux/amd64, linux/arm64/v8
context: python
file: python/sklearn.Dockerfile
push: false
# https://github.com/docker/buildx/issues/1533
provenance: false

# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/storage-initializer-docker-publisher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,21 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4

- name: Setup QEMU
uses: docker/setup-qemu-action@v3

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
cd python
docker buildx build . --file storage-initializer.Dockerfile
fi
uses: docker/build-push-action@v5
with:
platforms: linux/amd64, linux/arm64/v8
context: python
file: python/storage-initializer.Dockerfile
push: false
# https://github.com/docker/buildx/issues/1533
provenance: false

# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
Expand Down
Loading

0 comments on commit 18010f4

Please sign in to comment.