Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
$ cd ${SDK_DIR}/external/build/sample/docker/
$ docker build -t compile/ubuntu-rel:0.1 .
Info

If it the installation fails with due to an error, please do the following:
How to install qemu - Technology Partner FAQ (En) - Confluence (atlassian.net)install qemu as described below.

Check the directory to see if a repository “compile/ubuntu-rel” appears when you finish building the image.

...

Note

Make sure you see the following two files in the directory where Dockerfile is placed.

  • exec_entry.sh

  • qemu-aarch64-static

Do not delete these files as you will need them when creating Python module.

How to install qemu

qemu must be installed in the development environment in order to create container version additional apps. Describe how to install qemu. If you have completed creating the Docker image, there is no need to install qemu, so please proceed to the next chapter.

Info

After restarting the PC, linux/arm64 may not appear in buildable architectures. In that case, please install qemu again by the same procedure.

install qemu

Code Block
sudo apt update
sudo apt-get install qemu binfmt-support qemu-user-static # Install the qemu packages
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes # This step will execute the registering scripts

 

The third line also has a means to do the following:

Code Block
sudo docker run --privileged --rm tonistiigi/binfmt --install all

The official document (Japanese) as of June 2023 guides here.

Docker Buildx | Docker ドキュメント (matsuand.github.io)

 

Preparing docker buildx

  • Add and reflect environment variables to use experimental features and BuildKit.

  • Open configuration file.

    Code Block
    vi ~/.bashrc
  • Add the following to the end

    Code Block
    export DOCKER_CLI_EXPERIMENTAL=enabled
    export DOCKER_BUILDKIT=1

    Save file.

  • Check if buildx is available.

    Code Block
    docker --help | grep buildx

    Output example

    Code Block
      buildx*     Docker Buildx (Docker Inc., v0.10.5)

     

  • Check the currently buildable architectures.

    Code Block
    docker buildx ls

    Output example

    Code Block
    NAME/NODE DRIVER/ENDPOINT STATUS  BUILDKIT                              PLATFORMS
    default * docker
      default default         running v0.11.7-0.20230525183624-798ad6b0ce9f linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/amd64/v4, linux/386, linux/arm64, linux/riscv64, linux/ppc64, linux/ppc64le, linux/s390x, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6

    If you see linux/arm64 in this output, success.

Compile Python module(Numpy, OpenCV)

...