How to Build from Source#
Build the Multi-level Video Understanding Microservice 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 system requirements.
Follow all the steps provided in get started documentation with respect to Setup GenAI Model Servings for VLM and LLM, setting up dependent VLM and LLM model serving services.
This guide assumes basic familiarity with Git commands, Python virtual environments, and terminal usage. If you are new to these concepts, see:
Steps to Build#
Following options are provided to build the microservice.
Setup in a container using Docker Script#
Clone the repository:
git clone https://github.com/open-edge-platform/edge-ai-libraries.git edge-ai-libraries
Set the required environment variables:
# Optional: Set registry URL and project name for docker image naming export REGISTRY_URL=<your-registry-url> export TAG=<your-yag> # Default: latest
If
REGISTRY_URLis provided, the final image name will be:${REGISTRY_URL}/multilevel-video-understanding:${TAG}IfREGISTRY_URLis not provided, the image name will be:multilevel-video-understanding:${TAG}Run the setup script to build docker image:
cd edge-ai-libraries/microservices/multilevel-video-understanding chmod +x ./setup_docker.sh ./setup_docker.sh --build
Run the setup script to bring up production version of application:
./setup_docker.sh --prod # Or just eliminate `--prod`: ./setup_docker.sh
Docker Setup Options#
The setup_docker.sh script supports the following options:
Usage: ./setup_docker.sh [options]
Options:
--prod Create and start production containers only
--build Build production Docker image only
--build-prod Build and then run production Docker images
--down Stop and remove all containers, networks, and volumes
-h, --help Show this help message
Examples:
./setup_docker.sh Create and start production containers only
./setup_docker.sh --prod Create and start production containers only
./setup_docker.sh --build Build production Docker image only
./setup_docker.sh --build-prod Build and then run production Docker images
./setup_docker.sh --down Stop and remove all containers
Setup and run on host#
Host setup by default uses local filesystem storage backend.
Please refer to Manual Host Setup using Poetry
Supporting Resources#
Overview