Skip to content

Commit

Permalink
feat(workflows): Add arm64 Docker publish workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel A. Cabrera Minagorri <[email protected]>
  • Loading branch information
miguelaeh committed Jan 17, 2024
1 parent a48385a commit 7355970
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 8 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,24 @@ on:

jobs:
push_to_registry:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, self-hosted]
arch: [x64, arm64]

name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3

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

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

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
Expand All @@ -43,6 +55,7 @@ jobs:
with:
context: "{{defaultContext}}:package"
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ inputs.tag_override != '' && inputs.tag_override || steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand All @@ -54,6 +67,12 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v3

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

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

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
Expand All @@ -73,6 +92,7 @@ jobs:
with:
context: "{{defaultContext}}:package"
file: ./Dockerfile-cuda
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ inputs.cuda_tag_override != '' && inputs.cuda_tag_override || steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand All @@ -84,6 +104,12 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v3

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

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

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
Expand All @@ -103,6 +129,7 @@ jobs:
with:
context: "{{defaultContext}}:package"
file: ./Dockerfile-tensorrt
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ inputs.tensorrt_tag_override != '' && inputs.tensorrt_tag_override || steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
8 changes: 1 addition & 7 deletions .github/workflows/pipeless-build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,6 @@ jobs:
mv pipeless/target/release/pipeless-ai pipeless/target/release/pipeless
strip pipeless/target/release/pipeless
mkdir pipeless-${{ steps.check_version.outputs.new_version }}
if [[ ! -e pipeless/target/release/libonnxruntime.so.1.16.3 ]]; then
# The pipeless binary will be linked to libonnxruntime.so.1.16.3 so it must exist
cp pipeless/target/release/libonnxruntime.so pipeless/target/release/libonnxruntime.so.1.16.3
fi
cp pipeless/target/release/{pipeless,libonnxruntime*} pipeless-${{ steps.check_version.outputs.new_version }}/
tar -czf pipeless-${{ steps.check_version.outputs.new_version }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz pipeless-${{ steps.check_version.outputs.new_version }}
Expand Down Expand Up @@ -183,7 +177,7 @@ jobs:
strip pipeless/target/release/pipeless &&
mkdir pipeless-${{ steps.check_version.outputs.new_version }}
cp pipeless/target/release/{pipeless,libonnxruntime*} pipeless-${{ steps.check_version.outputs.new_version }}
# Copy the file that we renamed adding the version after building onnx runtime
# HACK: Copy the file that we renamed adding the version after building onnx runtime
cp /home/miguelaeh/.pipeless/libonnxruntime* pipeless-${{ steps.check_version.outputs.new_version }}/
tar -czf pipeless-${{ steps.check_version.outputs.new_version }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz pipeless-${{ steps.check_version.outputs.new_version }}
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ setupPipelessEnv() {
echo ""
echo ' export PATH="${PATH}:${HOME}/.pipeless"'
if [[ "$OS" == "darwin" ]]; then
# In macOS we have to use the rpath instead of the library path
# In macOS we have to use the rpath instead of the library path because the ort library file uses .dylib
install_name_tool -add_rpath @executable_path "${PIPELESS_INSTALL_DIR}/pipeless"
else
echo ' export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${HOME}/.pipeless"'
Expand Down

0 comments on commit 7355970

Please sign in to comment.