![]() Kria™ Rebuilding Application Docker Containers Tutorial |
Rebuilding Application Docker Containers Tutorial |
Rebuilding Application Docker Containers Tutorial¶
Introduction¶
This tutorial provides the steps required to rebuild Docker containers for Kria SOM. Developer can build individual application images, but a full set of Docker files are provided to build the example Docker images in Kria Docker git repo.
There are two Docker images used to rebuild Docker containers. They make use of a Docker incremental build approach to reduce final image size.
The kria-developer Docker image can be found on Docker hub. It contains all the development libraries user needs to build against.
The kria-runtime Docker image is a subset of the kria-developer Docker image, it can also be found on Docker hub. It contains only the runtime library dependencies, thus is a smaller footprint base image by which to install a pre-built app.
Requirement¶
The Docker container can be rebuilt on target (Kria SOM) or on a host machine. If rebuilding on a host machine, it must be a ARM-based CPU.
Steps to Build¶
Clone the kria-docker git repo:
git clone --branch xlnx_rel_v2022.1 https://github.com/Xilinx/kria-docker.git cd kria-docker/dockerfiles
build the application of interest.
Command :
docker build -f <dockerfile name> . -t <Name of the image>
Example commands:
docker build -f aibox-reid . -t aibox-reid docker build -f nlp-smartvision . -t nlp-smartvision docker build -f smartcam . -t smartcam docker build -f defect-detect . -t defect-detect
The Docker script will pull in the kria-developer and kria-runtime Docker image on build machine, and appropiate git repos to build the application images.
Steps to Load¶
Built on Target¶
If the Docker image was built on target, issue below command to see that its present:
docker images
The image can be then ran using docker run command.
Built on Host¶
If the Docker image was built on host, it needs to be moved over to the target.
Once Docker image is created, save the image to tar ball with:
docker save -o <filename.tar> <image_name>:<tag_name>
Copy the tar ball to target then load the Docker image
docker load -i <filename.tar>
Issue below command to see that its present:
docker images
The image can be then ran using docker run command.
License¶
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright© 2021 Xilinx