Build from Source#

Build the Image-Based Video Search sample application from source to customize, debug, or extend its functionality. In this guide, you will:

  • Set up your development environment.

  • Compile the source code and resolve dependencies.

  • Generate a runnable build for local testing or deployment.

This guide is ideal for developers who want to work directly with the source code.

Prerequisites#

Before you begin, ensure the following:

  • System Requirements: Verify your system meets the minimum requirements.

  • Dependencies Installed:

  • Permissions: Confirm you have permissions to install software and modify environment configurations.

Installing behind a proxy#

  1. Follow this guide to configure your Docker environment: Use a proxy server with the Docker CLI | Docker Documentation

  2. Pull base images:

    docker pull docker.io/library/node:23
    docker pull docker.io/library/python:3.11
    docker pull docker.io/intel/dlstreamer:2025.0.1.3-ubuntu24
    docker pull openvino/ubuntu22_dev:2024.6.0
    

Steps to Build#

  1. Clone the Repository:

    • Run:

      git clone https://github.com/open-edge-platform/edge-ai-suites.git
      cd ./edge-ai-suites/metro-ai-suite/image-based-video-search
      
  2. Build Containers:

    • Run:

      docker compose build
      
  3. Download Models:

    • For Linux:

      MODELS_PATH="$(pwd)/src/dlstreamer-pipeline-server/models"
      
      docker run --rm \
          -v $MODELS_PATH:/output \
          openvino/ubuntu22_dev:2024.6.0 bash -c \
          "omz_downloader --name resnet-50-pytorch --output_dir models && \
           omz_converter --name resnet-50-pytorch --download_dir models --output_dir models && \
           cp -r ./models/public/resnet-50-pytorch /output"
      
      docker run --rm \
          -v $MODELS_PATH:/output \
          openvino/ubuntu22_dev:2024.6.0 bash -c \
          "omz_downloader --name person-vehicle-bike-detection-2004 --output_dir models && \
           omz_converter --name person-vehicle-bike-detection-2004 --download_dir models --output_dir models && \
           cp -r ./models/intel/person-vehicle-bike-detection-2004 /output"
      
    • For Windows:

      $MODELS_PATH="$PWD\src\dlstreamer-pipeline-server\models"
      
      docker run --rm `
          -v ${MODELS_PATH}:/output `
          openvino/ubuntu22_dev:2024.6.0 bash -c `
          "omz_downloader --name resnet-50-pytorch --output_dir models && `
           omz_converter --name resnet-50-pytorch --download_dir models --output_dir models && `
           cp -r ./models/public/resnet-50-pytorch /output"
      
      docker run --rm `
          -v ${MODELS_PATH}:/output `
          openvino/ubuntu22_dev:2024.6.0 bash -c `
          "omz_downloader --name person-vehicle-bike-detection-2004 --output_dir models && `
           omz_converter --name person-vehicle-bike-detection-2004 --download_dir models --output_dir models && `
           cp -r ./models/intel/person-vehicle-bike-detection-2004 /output"
      

Validation#

  1. Start Containers:

    • Run:

      docker compose up -d
      
  2. Access the Application:

  3. Verify Build Success:

    • Check the logs. Look for confirmation messages indicating the microservice started successfully.

  4. Example Output:

    • Here is an example output:

Troubleshooting#

  1. Environment Configuration Issues:

    • Verify environment variables:

      echo $VARIABLE_NAME