Install development environment(Container AdamApp)

 

Table of contents


 

Overview


This section explains how to build an environment for developing container apps using iPRO Camera SDK. In this tutorial, the installation directory of SDK is written as ${SDK_DIR}.

Container AdamApp is for cameras with SoC ambaCV5X and firmware version 3.30 or later, and can be developed with SDK version 2.10 or later. Please check here for camera SoC.

 

Recommended development environment


The recommended supported environments are as follows:

  • OS :Linux (64bit)

  • Distribution :Ubuntu 22.04 LTS, Ubuntu 20.04 LTS

 

Development environment construction procedure


Obtaining a Developer License

Please apply for and obtain a developer license from the link below.

Inquiry / SDK Download - Development Partner Portal (En) (i-pro.com)

 

Preparing the Docker environment

Install Docker Engine on your development PC.

Follow the instructions here to install Docker Engine. Below is an outline of the page.

 

  • Just to be safe, uninstall the old package.
    However, please make sure in advance that it is okay to uninstall the package. We are not responsible for any problems that may occur as a result of deleting it.

    for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done

     

  • Add the Docker repository to be used with apt-get. Copy and paste the four lines starting with echo together.

    # Add Docker's official GPG key: sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc # Add the repository to Apt sources: echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update
  • Install the latest Docker engine.

    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

    When asked "Do you want to continue? [Y/n]", enter Y and press Enter.

  • Check the operation after installation. 

    This is an example of what will be displayed if the operation is successful.

 

The above will fail if you are connected to the Internet via a proxy server. Please follow the steps below for "If connecting via a proxy server" section.

 

If you are using WSL2 to build your environment on a Windows PC, you may experience an issue where Docker cannot be started on Ubuntu-22.04.

In that case, please refer to the information here and use iptables-legacy.

  • The docker command requires root privileges by default, so add the user to the docker group so that it can be executed with user privileges.
    The official documentation states this in Post-installation steps | Docker Docs.

  • Create a docker user group.

    If you see the message "groupadd: group 'docker' already exists", the group has already been created so continue.

  • Add the user you normally use to the docker group.

     

  • The settings will be reflected.

     

  • Verify that Docker can be run without sudo.

    This is an example of what will be displayed if the operation is successful.

     

  • Change the systemd configuration to automatically start the Docker service at boot time.

     

  • Restart Ubuntu once to check if the docker service starts at boot time. In WSL, you cannot restart in the ubuntu terminal. Once you close the window with the x button, start powershell and enter the following.

     

  • Then start Ubuntu 22.04 LTS again from the start menu.

  • Enter the following command and if the correct version number is displayed, it is successful.

    This is an example of what is displayed when the operation is successful.

 

If connecting via a proxy server

Follow the steps to allow Docker to access the Internet via a proxy server. If you are not using a proxy server, you do not need to follow these steps.

 

Install qemu

This article describes how to install qemu, which is required in the development environment to create a container version of the additional app.

 

Installing qemu

 

Preparing for docker buildx

  • To use experimental features and BuildKit, set and reflect additional environment variables.

  • Open the configuration file:

  • Add the following to the end

    Save the file.

  • Check if buildx is available.

    Example output

     

  • Check the architectures that can currently be built.

    Example output

    If you see linux/arm64 in the output, you're successful.

 

Checking the development environment

We will check whether the environment has been built.
*The results are just an example, and may differ depending on your environment.

  • Docker Engine is installed

    If it is not installed, please install Docker Engine.

  • The Docker daemon is running.
    [If you are using systemd]

    If Active is inactive (dead), start the service with the systemctl start docker command.

  • Docker buildx installed

    If none are listed, follow Docker Buildx to install them separately.


  • qemu is installed and Arm64-bit apps can be cross-built. Make sure linux/arm64 is in the list below.

    If you don't have linux/arm64, install qemu.

Installing the Docker extension module

To use docker capability, it is necessary to install “Docker extension module” into camera in advance.

Please request Docker extension module from the link.

Inquiry / SDK Download - Development Partner Portal (En) (i-pro.com)

Please install from the screen in the red frame below. If it appears as in the green frame, the installation was successful.

img-20240913-173409.png