Skip to content

Commit

Permalink
Add ARM64 arch support for serving runtimes (kubeflow#3038)
Browse files Browse the repository at this point in the history
Except for Paddle, which does not support arm64/aarch64

Signed-off-by: Sivanantham Chinnaiyan <sivanantham.chinnaiyan@ideas2it.com>
  • Loading branch information
sivanantha321 authored Jul 27, 2023
1 parent 80640a6 commit 32be746
Show file tree
Hide file tree
Showing 19 changed files with 379 additions and 277 deletions.
33 changes: 22 additions & 11 deletions .github/workflows/alibiexplainer-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,19 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Build image
run: |
cd python
docker buildx build . --file alibiexplainer.Dockerfile --tag $IMAGE_NAME
- name: Setup QEMU
uses: docker/setup-qemu-action@v2

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

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

- name: Push image
- name: Export version variable
run: |
IMAGE_ID=kserve/$IMAGE_NAME
Expand All @@ -71,9 +75,16 @@ jobs:
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
echo VERSION=$VERSION >> $GITHUB_ENV
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v3
with:
platforms: linux/amd64, linux/arm64/v8
context: python
file: python/alibiexplainer.Dockerfile
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}

docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION

35 changes: 22 additions & 13 deletions .github/workflows/artexplainer-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,19 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Build image
run: |
cd python
docker buildx build . --file artexplainer.Dockerfile --tag $IMAGE_NAME
- name: Setup QEMU
uses: docker/setup-qemu-action@v2

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

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

- name: Push image
- name: Export version variable
run: |
IMAGE_ID=kserve/$IMAGE_NAME
Expand All @@ -71,9 +75,14 @@ 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@v3
with:
platforms: linux/amd64, linux/arm64/v8
context: python
file: python/artexplainer.Dockerfile
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}
34 changes: 22 additions & 12 deletions .github/workflows/lightgbm-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,19 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Build image
run: |
cd python
docker buildx build . --file lgb.Dockerfile --tag $IMAGE_NAME
- name: Setup QEMU
uses: docker/setup-qemu-action@v2

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

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

- name: Push image
- name: Export version variable
run: |
IMAGE_ID=kserve/$IMAGE_NAME
Expand All @@ -71,8 +75,14 @@ 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@v3
with:
platforms: linux/amd64, linux/arm64/v8
context: python
file: python/lgb.Dockerfile
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}
33 changes: 21 additions & 12 deletions .github/workflows/paddle-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,19 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Build image
run: |
cd python
docker buildx build . --file paddle.Dockerfile --tag $IMAGE_NAME
- name: Setup QEMU
uses: docker/setup-qemu-action@v2

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

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

- name: Push image
- name: Export version variable
run: |
IMAGE_ID=kserve/$IMAGE_NAME
Expand All @@ -71,8 +75,13 @@ 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@v3
with:
platforms: linux/amd64
context: python
file: python/paddle.Dockerfile
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}
35 changes: 22 additions & 13 deletions .github/workflows/pmml-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,19 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Build image
run: |
cd python
docker buildx build . --file pmml.Dockerfile --tag $IMAGE_NAME
- name: Setup QEMU
uses: docker/setup-qemu-action@v2

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

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

- name: Push image
- name: Export version variable
run: |
IMAGE_ID=kserve/$IMAGE_NAME
Expand All @@ -71,9 +75,14 @@ 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@v3
with:
platforms: linux/amd64, linux/arm64/v8
context: python
file: python/pmml.Dockerfile
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}
34 changes: 22 additions & 12 deletions .github/workflows/sklearnserver-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,19 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Build image
run: |
cd python
docker buildx build . --file sklearn.Dockerfile --tag $IMAGE_NAME
- name: Setup QEMU
uses: docker/setup-qemu-action@v2

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

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

- name: Push image
- name: Export version variable
run: |
IMAGE_ID=kserve/$IMAGE_NAME
Expand All @@ -71,9 +75,15 @@ 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@v3
with:
platforms: linux/amd64, linux/arm64/v8
context: python
file: python/sklearn.Dockerfile
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}

32 changes: 21 additions & 11 deletions .github/workflows/storage-initializer-docker-publisher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,19 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Build image
run: |
cd python
docker buildx build . --file storage-initializer.Dockerfile --tag $IMAGE_NAME
- name: Setup QEMU
uses: docker/setup-qemu-action@v2

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

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

- name: Push image
- name: Export version variable
run: |
IMAGE_ID=kserve/$IMAGE_NAME
Expand All @@ -71,9 +75,15 @@ jobs:
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
echo VERSION=$VERSION >> $GITHUB_ENV
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
- name: Build and push
uses: docker/build-push-action@v3
with:
platforms: linux/amd64, linux/arm64/v8
context: python
file: python/storage-initializer.Dockerfile
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}
32 changes: 21 additions & 11 deletions .github/workflows/xgbserver-docker-publisher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,19 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Build image
run: |
cd python
docker buildx build . --file xgb.Dockerfile --tag $IMAGE_NAME
- name: Setup QEMU
uses: docker/setup-qemu-action@v2

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

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

- name: Push image
- name: Export version variable
run: |
IMAGE_ID=kserve/$IMAGE_NAME
Expand All @@ -71,9 +75,15 @@ jobs:
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
echo VERSION=$VERSION >> $GITHUB_ENV
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
- name: Build and push
uses: docker/build-push-action@v3
with:
platforms: linux/amd64, linux/arm64/v8
context: python
file: python/xgb.Dockerfile
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}
3 changes: 3 additions & 0 deletions python/aiffairness.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ FROM ${BASE_IMAGE} as builder
ARG POETRY_HOME=/opt/poetry
ARG POETRY_VERSION=1.4.0

# Required for building packages for arm64 arch
RUN apt-get update && apt-get install -y --no-install-recommends python3-dev build-essential

RUN python3 -m venv ${POETRY_HOME} && ${POETRY_HOME}/bin/pip install poetry==${POETRY_VERSION}
ENV PATH="$PATH:${POETRY_HOME}/bin"

Expand Down
3 changes: 3 additions & 0 deletions python/alibiexplainer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ FROM ${BASE_IMAGE} as builder
ARG POETRY_HOME=/opt/poetry
ARG POETRY_VERSION=1.4.0

# Required for building packages for arm64 arch
RUN apt-get update && apt-get install -y --no-install-recommends python3-dev build-essential

RUN python3 -m venv ${POETRY_HOME} && ${POETRY_HOME}/bin/pip install poetry==${POETRY_VERSION}
ENV PATH="$PATH:${POETRY_HOME}/bin"

Expand Down
Loading

0 comments on commit 32be746

Please sign in to comment.