Skip to content

fix: docker build error based on platform #151

fix: docker build error based on platform

fix: docker build error based on platform #151

name: Build minimal-ml-inference application
on:
push:
paths:
- 'minimal-ml-inference/**'
- '!minimal-ml-inference/README.md'
- '.github/workflows/minimal-ml-inference.yml'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
env:
EXREPO: acap-computer-vision-examples
EXNAME: minimal-ml-inference
strategy:
matrix:
include:
- chip: cpu
- chip: artpec8
steps:
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v2
with:
install: true
- name: Build ${{ env.example }} application
env:
example: ${{ env.EXNAME }}-${{ matrix.chip }}
imagetag: ${{ env.EXREPO }}_${{ env.EXNAME }}-${{ matrix.chip }}:1.0
modeltag: ${{ env.EXREPO }}_${{ env.EXNAME }}-${{ matrix.chip }}-model:1.0
run: |
cd $EXNAME
docker run --rm --privileged multiarch/qemu-user-static --credential yes --persistent yes
docker build --no-cache --build-arg CHIP=${{ matrix.chip }} --tag $imagetag .
docker build --file Dockerfile.model --tag $modeltag .