File tree Expand file tree Collapse file tree 9 files changed +25
-12
lines changed
pose-estimator-with-flask Expand file tree Collapse file tree 9 files changed +25
-12
lines changed Original file line number Diff line number Diff line change 11# syntax=docker/dockerfile:1
22
33ARG UBUNTU_VERSION=24.04
4+ ARG DEVICE_PLATFORM=linux/arm64/v8
45
5- FROM arm64v8/ ubuntu:${UBUNTU_VERSION}
6+ FROM --platform=$DEVICE_PLATFORM ubuntu:${UBUNTU_VERSION}
67
78RUN DEBIAN_FRONTEND=noninteractive \
89 apt-get update && apt-get install -y --no-install-recommends \
Original file line number Diff line number Diff line change @@ -44,6 +44,9 @@ Define and export the application image name in `APP_NAME` for use in the Docker
4444``` sh
4545export APP_NAME=hello-world-python
4646
47+ # Install qemu to allow build for a different architecture
48+ docker run --rm --privileged multiarch/qemu-user-static --credential yes --persistent yes
49+
4750docker build --tag $APP_NAME .
4851```
4952
Original file line number Diff line number Diff line change @@ -4,9 +4,10 @@ ARG RUNTIME_VERSION=2.0.0
44ARG REPO=axisecp
55ARG IMAGE=acap-runtime
66ARG UBUNTU_VERSION=24.04
7+ ARG DEVICE_PLATFORM=linux/arm64/v8
78
8- FROM ${REPO}/${IMAGE}:${RUNTIME_VERSION}-protofiles AS proto-image
9- FROM arm64v8/ ubuntu:${UBUNTU_VERSION} AS runtime-image
9+ FROM --platform=$DEVICE_PLATFORM ${REPO}/${IMAGE}:${RUNTIME_VERSION}-protofiles AS proto-image
10+ FROM --platform=$DEVICE_PLATFORM ubuntu:${UBUNTU_VERSION} AS runtime-image
1011
1112RUN DEBIAN_FRONTEND=noninteractive \
1213 apt-get update && apt-get install -y --no-install-recommends \
Original file line number Diff line number Diff line change @@ -4,9 +4,10 @@ ARG RUNTIME_VERSION=2.0.0
44ARG REPO=axisecp
55ARG IMAGE=acap-runtime
66ARG UBUNTU_VERSION=24.04
7+ ARG DEVICE_PLATFORM=linux/arm64/v8
78
8- FROM ${REPO}/${IMAGE}:${RUNTIME_VERSION}-protofiles AS proto-image
9- FROM arm64v8/ ubuntu:${UBUNTU_VERSION} AS runtime-image
9+ FROM --platform=$DEVICE_PLATFORM ${REPO}/${IMAGE}:${RUNTIME_VERSION}-protofiles AS proto-image
10+ FROM --platform=$DEVICE_PLATFORM ubuntu:${UBUNTU_VERSION} AS runtime-image
1011
1112RUN DEBIAN_FRONTEND=noninteractive \
1213 apt-get update && apt-get install -y --no-install-recommends \
Original file line number Diff line number Diff line change @@ -4,9 +4,10 @@ ARG RUNTIME_VERSION=2.0.0
44ARG REPO=axisecp
55ARG IMAGE=acap-runtime
66ARG UBUNTU_VERSION=24.04
7+ ARG DEVICE_PLATFORM=linux/arm64/v8
78
8- FROM ${REPO}/${IMAGE}:${RUNTIME_VERSION}-protofiles AS proto-image
9- FROM arm64v8/ ubuntu:${UBUNTU_VERSION} AS runtime-image
9+ FROM --platform=$DEVICE_PLATFORM ${REPO}/${IMAGE}:${RUNTIME_VERSION}-protofiles AS proto-image
10+ FROM --platform=$DEVICE_PLATFORM ubuntu:${UBUNTU_VERSION} AS runtime-image
1011
1112RUN DEBIAN_FRONTEND=noninteractive \
1213 apt-get update && apt-get install -y --no-install-recommends \
Original file line number Diff line number Diff line change @@ -45,6 +45,9 @@ Define and export the application image name in `APP_NAME` for use in the Docker
4545``` sh
4646export APP_NAME=acap-opencv-qr-decoder-python
4747
48+ # Install qemu to allow build for a different architecture
49+ docker run --rm --privileged multiarch/qemu-user-static --credential yes --persistent yes
50+
4851docker build --tag $APP_NAME .
4952```
5053
Original file line number Diff line number Diff line change @@ -4,9 +4,10 @@ ARG RUNTIME_VERSION=2.0.0
44ARG REPO=axisecp
55ARG IMAGE=acap-runtime
66ARG UBUNTU_VERSION=24.04
7+ ARG DEVICE_PLATFORM=linux/arm64/v8
78
8- FROM ${REPO}/${IMAGE}:${RUNTIME_VERSION}-protofiles AS proto-image
9- FROM arm64v8/ ubuntu:${UBUNTU_VERSION} AS runtime-image
9+ FROM --platform=$DEVICE_PLATFORM ${REPO}/${IMAGE}:${RUNTIME_VERSION}-protofiles AS proto-image
10+ FROM --platform=$DEVICE_PLATFORM ubuntu:${UBUNTU_VERSION} AS runtime-image
1011
1112RUN DEBIAN_FRONTEND=noninteractive \
1213 apt-get update && apt-get install -y --no-install-recommends \
Original file line number Diff line number Diff line change @@ -4,9 +4,10 @@ ARG RUNTIME_VERSION=2.0.0
44ARG REPO=axisecp
55ARG IMAGE=acap-runtime
66ARG UBUNTU_VERSION=24.04
7+ ARG DEVICE_PLATFORM=linux/arm64/v8
78
8- FROM ${REPO}/${IMAGE}:${RUNTIME_VERSION}-protofiles AS proto-image
9- FROM arm64v8/ ubuntu:${UBUNTU_VERSION} AS runtime-image
9+ FROM --platform=$DEVICE_PLATFORM ${REPO}/${IMAGE}:${RUNTIME_VERSION}-protofiles AS proto-image
10+ FROM --platform=$DEVICE_PLATFORM ubuntu:${UBUNTU_VERSION} AS runtime-image
1011
1112RUN DEBIAN_FRONTEND=noninteractive \
1213 apt-get update && apt-get install -y --no-install-recommends \
Original file line number Diff line number Diff line change 11# syntax=docker/dockerfile:1
22
33ARG UBUNTU_VERSION=24.04
4+ ARG DEVICE_PLATFORM=linux/arm64/v8
45
5- FROM arm64v8/ ubuntu:${UBUNTU_VERSION} as runtime-image
6+ FROM --platform=$DEVICE_PLATFORM ubuntu:${UBUNTU_VERSION}
67
78# Setup environment variables
89ENV DEBIAN_FRONTEND=noninteractive
You can’t perform that action at this time.
0 commit comments