make
commands.Cargo cross
and subsequent docker build
commands include the cross-built binaries.Note: For Rust code,build/Dockerfile.*
does NOT runcargo build
, instead they simply copy cross-built binaries into the container
build/Dockerfile.*
must do whatever building is required.make
command. These are the supporting makefiles:Makefile
: this provides a single point of entry to build any Akri componentbuild/akri-containers.mk
: this provides the build and push functionality for Akri containersbuild/akri-rust-containers.mk
: this provides a simple definition to build and push Akri components written in Rustbuild/akri-dotnet-containers.mk
: this provides a simple definition to build and push Akri components written in .NETbuild/akri-python-containers.mk
: this provides a simple definition to build and push Akri components written in PythonCACHE_OPTION=--no-cache
, the docker build
commands will not use local cachesmake akri-build
: run Rust cross-build for all platformsBUILD_AMD64=0 BUILD_ARM32=0 BUILD_ARM64=1 make akri-build
: run Rust cross-build for ARM64PREFIX=ghcr.io/myaccount make akri
: builds all of the Akri containers and stores them in a container registry, ghcr.io/myaccount
.PREFIX=ghcr.io/myaccount make akri
: builds all of the Akri containers and stores them in a container registry, ghcr.io/myaccount
.PREFIX=ghcr.io/myaccount LABEL_PREFIX=local make akri
: builds all of the Akri containers and stores them in a container registry, ghcr.io/myaccount
with labels prefixed with local
.PREFIX=ghcr.io/myaccount BUILD_AMD64=1 BUILD_ARM32=0 BUILD_ARM64=0 make akri
: builds all of the Akri containers for AMD64 and stores them in a container registry, ghcr.io/myaccount
.PREFIX=ghcr.io/myaccount make akri-controller
: builds the Akri controller container for all platforms and stores them in a container registry, ghcr.io/myaccount
.akri-<component>
: this target will cross-build Akri and build+push this component's container for all platformsakri-docker-<component>
: this target will build+push this component's container for all platforms<component>-build
: this target will build this component's container for all platforms<component>-build-amd64
: this target will build this component's container for amd64<component>-build-arm32
: this target will build this component's container for arm32<component>-build-arm64
: this target will build this component's container for arm64<component>-docker-per-arch
: this target will push this component's container for all platforms<component>-docker-per-arch-amd64
: this target will push this component's container for amd64<component>-docker-per-arch-arm32
: this target will push this component's container for arm32<component>-docker-per-arch-arm64
: this target will push this component's container for arm64<component>-docker-multi-arch-create
: this target will create a multi-arch manifest for this component and include all platforms<component>-docker-multi-arch-push
: this target will push a multi-arch manifest for this component<new-component>
):$(eval $(call add_rust_targets,<new-component>,<new-component>))
to build/akri-containers.mk
build/Dockerfile.<new-component>
A simple way to do this is to copybuild/Dockerfile.agent
and replaceagent
with whatever<new-component>
is.
.github/workflows/build-<new-component>-container.yml
A simple way to do this is to copy .github/workflows/build-agent-container.yml
and replace agent
with whatever <new-component>
is.Cargo cross
with a Rust build environment that has all the required dependencies installed. This container can be built locally for all platforms using this command:rust-crossbuild
changes (new dependencies, etc) AND update BUILD_RUST_CROSSBUILD_VERSION
in build/intermediate-containers.mk
. This PR is intended to create the new version of rust-crossbuild
(not to use it).rust-crossbuild
is pushed to ghcr.io/akri, create PR with any changes that will leverage the new version of rust-crossbuild
AND update Cross.toml
(the BUILD_RUST_CROSSBUILD_VERSION
value specified in step 1 should be each label's suffix). This PR is intended to use the new version of rust-crossbuild
.opencvsharp-build
changes (new dependencies, etc) AND update BUILD_OPENCV_BASE_VERSION
in build/intermediate-containers.mk
. This PR is intended to create the new version of opencvsharp-build
(not to use it).opencvsharp-build
is pushed to ghcr.io/akri, create PR with any changes that will leverage the new version of opencvsharp-build
AND update USE_OPENCV_BASE_VERSION
in build/akri-containers.mk
. This PR is intended to use the new version of opencvsharp-build
.<component>
is one of (controller
|agent
|udev
|webhook-configuration
|onvif
|opcua-monitoring
|anomaly-detection
|streaming
) and <platform>
is one of (amd64
|arm32
|arm64
):