### Run Video Summary UI Application (npm) Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/sample-applications/video-search-and-summarization/ui/react/README.md Starts the Video Summary UI development server using npm. This command should be executed from the `ui/react` directory after installing dependencies. ```bash npm run dev ``` -------------------------------- ### Run Audio Analyzer Setup Script Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/audio-analyzer/docs/user-guide/how-to-build-from-source.md Navigates to the audio-analyzer microservice directory, makes the setup script executable, and runs it. This script installs dependencies, sets up storage, and starts the service. Requires bash-compatible shell. ```bash cd edge-ai-libraries/microservices/audio-analyzer chmod +x ./setup_host.sh ./setup_host.sh ``` -------------------------------- ### Build and Run Application with Make Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/tools/visual-pipeline-and-platform-evaluation-tool/docs/user-guide/get-started.md Builds the model containers and starts the application using Make targets. This command orchestrates the Docker build process for models and runs the complete application stack. Requires Docker and Make to be installed on the system. ```bash make build-models run ``` -------------------------------- ### Basic CPU Setup Example (Bash) Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/vlm-openvino-serving/docs/user-guide/environment-variables.md Minimal configuration for running the platform on CPU, including setting the model name and sourcing the setup script. ```bash # Minimal required configuration export VLM_MODEL_NAME=Qwen/Qwen2.5-VL-3B-Instruct source setup.sh ``` -------------------------------- ### Docker Configuration Examples Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/time-series-analytics/docs/user-guide/get-started.md Configuration snippets for Docker to manage proxy settings and enable log rotation. These examples help in setting up a robust Docker environment for the AI libraries. ```json { "proxies": { "default": { "httpProxy": "http://:", "httpsProxy": "http://:", "noProxy": "127.0.0.1,localhost" } } } ``` ```json { "log-driver": "json-file", "log-opts": { "max-size": "10m", "max-file": "5" } } ``` -------------------------------- ### GPU Acceleration Setup Example (Bash) Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/vlm-openvino-serving/docs/user-guide/environment-variables.md Configuration for enabling GPU acceleration, including setting the model and device, optimizing performance, and sourcing the setup script. ```bash # GPU configuration with performance optimization export VLM_MODEL_NAME=Qwen/Qwen2.5-VL-3B-Instruct export VLM_DEVICE=GPU export OV_CONFIG='{"PERFORMANCE_HINT": "THROUGHPUT"}' source setup.sh ``` -------------------------------- ### Clone and Build Docker Images for Edge AI Libraries Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/visual-data-preparation-for-retrieval/milvus/docs/user-guide/get-started.md This snippet covers cloning the Edge AI Libraries repository and building the necessary Docker images. It includes commands for cloning the source code, navigating to the microservices directory, and building images for dataprep-visualdata-milvus and multimodal-embedding-serving. Ensure Docker is installed and accessible. ```bash git clone https://github.com/open-edge-platform/edge-ai-libraries.git cd edge-ai-libraries/microservices docker build -t dataprep-visualdata-milvus:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy --build-arg no_proxy=$no_proxy -f visual-data-preparation-for-retrieval/milvus/src/Dockerfile . # build the dependency image cd multimodal-embedding-serving docker build -t multimodal-embedding-serving:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy --build-arg no_proxy=$no_proxy -f docker/Dockerfile . ``` -------------------------------- ### Install Project Dependencies with Poetry Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/vlm-openvino-serving/docs/user-guide/get-started.md Installs all project dependencies, including those required for testing. This command is essential before running any tests or coverage reports. ```bash poetry install --with test ``` -------------------------------- ### Force Model Reinstallation with Make Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/tools/visual-pipeline-and-platform-evaluation-tool/docs/user-guide/get-started.md Forces reinstallation of models for the Visual Pipeline and Platform Evaluation Tool. This command is useful when you need to manage or update installed models after initial setup. It triggers the model installation process interactively. ```bash make install-models-force ``` -------------------------------- ### Interact with Data Preparation Service (Info) Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/visual-data-preparation-for-retrieval/milvus/docs/user-guide/get-started.md This curl command retrieves information about the data preparation service. It sends a GET request to the /v1/dataprep/info endpoint. Ensure the DATAPREP_SERVICE_PORT environment variable is set correctly. ```curl curl -X GET http://localhost:$DATAPREP_SERVICE_PORT/v1/dataprep/info ``` -------------------------------- ### Install Dependencies for Video Summary UI (npm) Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/sample-applications/video-search-and-summarization/ui/react/README.md Installs all the necessary Node.js dependencies for the Video Summary UI application when not using Docker. This command is run from the `ui/react` directory. ```bash npm install ``` -------------------------------- ### Install Project Dependencies with Poetry Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/audio-analyzer/docs/user-guide/get-started.md Installs all project dependencies defined in the pyproject.toml file using Poetry. It first locks the dependencies to ensure reproducible builds and then installs them. ```bash poetry lock --no-update poetry install ``` -------------------------------- ### Setup Script Commands (Bash) Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/sample-applications/video-search-and-summarization/docs/user-guide/get-started.md Executes the setup.sh script for various application modes. Includes commands to stop the application, clean data, run video summarization, video search, or a unified search and summarization. Also shows how to set environment variables and view configurations without starting the application. ```bash source setup.sh --down source setup.sh --clean-data source setup.sh --summary source setup.sh --search source setup.sh --all ENABLE_OVMS_LLM_SUMMARY=true source setup.sh --summary source setup.sh --setenv source setup.sh --summary config source setup.sh --search config source setup.sh --all config ENABLE_OVMS_LLM_SUMMARY=true source setup.sh --summary config ``` -------------------------------- ### Configure GPU Device for VLM Server Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/vlm-openvino-serving/docs/user-guide/get-started.md Exports VLM_DEVICE to select GPU (automatic or specific device like GPU.0). Follow device configuration guide for multi-GPU setups. Setup script will auto-optimize to int4 compression and single worker on GPU. ```bash # For single GPU or automatic GPU selection export VLM_DEVICE=GPU # For specific GPU device (if multiple GPUs available) export VLM_DEVICE=GPU.0 # Use first GPU export VLM_DEVICE=GPU.1 # Use second GPU ``` -------------------------------- ### Start DL Streamer Pipeline Server Container Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/dlstreamer-pipeline-server/docs/user-guide/get-started.md This command starts the DL Streamer Pipeline Server container using Docker Compose. Ensure Docker and Docker Compose are installed and configured correctly. ```sh docker compose up ``` -------------------------------- ### Setup Environment Variables with Script Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/multimodal-embedding-serving/docs/user-guide/get-started.md Sources the `setup.sh` script to set up necessary environment variables, including determining whether the server should run on CPU or GPU. ```bash source setup.sh ``` -------------------------------- ### Launch microservice with Docker Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/multilevel-video-understanding/docs/user-guide/get-started.md Commands to clone the repository and launch the multilevel-video-understanding microservice using the setup_docker.sh script. ```bash git clone https://github.com/open-edge-platform/edge-ai-libraries.git edge-ai-libraries cd edge-ai-libraries/microservices/multilevel-video-understanding chmod +x ./setup_docker.sh ./setup_docker.sh ``` -------------------------------- ### Docker Setup Script Options Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/audio-analyzer/docs/user-guide/how-to-build-from-source.md Demonstrates various options for the `setup_docker.sh` script, allowing users to build and run development environments, only build images, or stop and remove existing containers. ```bash # Production setup: ./setup_docker.sh # Development setup: ./setup_docker.sh --dev # Build production image only: ./setup_docker.sh --build # Build development image only: ./setup_docker.sh --build-dev # Stop and remove all contianers: ./setup_docker.sh --down ``` -------------------------------- ### Get File Information from Data Preparation Service Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/visual-data-preparation-for-retrieval/milvus/docs/user-guide/get-started.md This curl command retrieves information about a specific file that has been processed by the data preparation service. It sends a GET request to the /v1/dataprep/get endpoint, specifying the 'file_path' as a query parameter. Ensure the file has been previously ingested. ```curl curl -X GET http://localhost:$DATAPREP_SERVICE_PORT/v1/dataprep/get?file_path=/path/to/file ``` -------------------------------- ### Installing Executable and Launch Files Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/libraries/robotics-ai-libraries/motion-control-gateway/robot_arm/hiwin/run_hiwin_plc/CMakeLists.txt Configures the installation rules for the built project. It specifies that the `run_hiwin_plc` executable should be installed in `lib/run_hiwin_plc` and the `launch` directory should be installed in `share/run_hiwin_plc`. This prepares the package for deployment. ```cmake install(TARGETS run_hiwin_plc DESTINATION lib/${PROJECT_NAME} ) install(DIRECTORY launch DESTINATION share/${PROJECT_NAME} ) ament_package() ``` -------------------------------- ### Set up environment variables for Docker Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/multilevel-video-understanding/docs/user-guide/get-started.md Configures the necessary environment variables for running the multilevel-video-understanding microservice. Includes basic and model-specific configurations. ```bash export REGISTRY_URL=intel/ export TAG=latest export VLM_BASE_URL="http://:41091/v1" export LLM_BASE_URL="http://:41090/v1" export VLM_MODEL_NAME=Qwen/Qwen2.5-VL-7B-Instruct export LLM_MODEL_NAME=Qwen/Qwen3-32B-AWQ ``` -------------------------------- ### Run VLM Server with Docker Compose on CPU Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/vlm-openvino-serving/docs/user-guide/get-started.md Starts the microservice server in detached mode using Docker Compose for CPU deployment. Assumes Docker is installed and environment variables are set. The service will be available on localhost:9764. ```bash docker compose -f docker/compose.yaml up -d ``` -------------------------------- ### Run Tests and Generate Coverage (Bash) Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/visual-data-preparation-for-retrieval/vdms/docs/user-guide/get-started.md Sets up the project environment, installs dependencies with specific profiles (CPU, dev), and then runs tests while generating a coverage report using Poetry and a custom setup script. ```bash # Switch to application directory (assuming you are in cloned repo's root dir) cd microservices/visual-data-preparation-for-retrieval/vdms poetry lock --no-update poetry install --with cpu,dev # Run tests and generate coverage report source setup.sh test ``` -------------------------------- ### Debug Setup Example (Bash) Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/vlm-openvino-serving/docs/user-guide/environment-variables.md Configuration for debugging purposes, enabling verbose logging and directing access logs to stdout. Includes setting the model, log level, and access log file. ```bash # Debug configuration with verbose logging export VLM_MODEL_NAME=Qwen/Qwen2.5-VL-3B-Instruct export VLM_LOG_LEVEL=debug export VLM_ACCESS_LOG_FILE="-" source setup.sh ``` -------------------------------- ### Run the Video Search and Summary Application Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/sample-applications/video-search-and-summarization/docs/user-guide/build-from-source.md Sources a setup script to configure and run the Video Search and Summary application using the newly built Docker images. ```bash source setup.sh --summary ``` -------------------------------- ### Download YOLOv11s Model and Setup Python Environment Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/libraries/dl-streamer/docs/source/get_started/install/install_guide_ubuntu_wsl2.md Commands to create a directory for models, set the model path environment variable, install Python virtual environment support, and download the YOLOv11s and coco128 models using a provided script. ```bash mkdir $HOME/models export MODELS_PATH=$HOME/models sudo apt install -y python3.12-venv /opt/intel/dlstreamer/samples/download_public_models.sh yolo11s coco128 ``` -------------------------------- ### Data Preparation Service API Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/visual-data-preparation-for-retrieval/milvus/docs/user-guide/get-started.md This section details the API endpoints for the Data Preparation service, allowing for information retrieval, file ingestion, and file management. ```APIDOC ## GET /v1/dataprep/info ### Description Retrieves general information about the Data Preparation service. ### Method GET ### Endpoint /v1/dataprep/info ### Parameters None ### Request Example ```curl curl -X GET http://localhost:$DATAPREP_SERVICE_PORT/v1/dataprep/info ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message or service status. #### Response Example { "message": "Data Prep Service is running." } ``` ```APIDOC ## POST /v1/dataprep/ingest ### Description Ingests files or directories into the system for processing. Supports both single file ingestion and directory ingestion. ### Method POST ### Endpoint /v1/dataprep/ingest ### Parameters #### Request Body - **file_dir** (string) - Optional - The path to the directory containing files to ingest. - **file_path** (string) - Optional - The path to a single file to ingest. - **meta** (object) - Optional - Metadata associated with the file (for single file ingestion). - **key** (string) - Description of the metadata key. - **value** (string) - Description of the metadata value. - **frame_extract_interval** (integer) - Optional - The interval in seconds for extracting frames from video files. Defaults to 15. - **do_detect_and_crop** (boolean) - Optional - Whether to perform object detection and cropping on extracted frames. Defaults to true. ### Request Example **For Directory:** ```curl curl -X POST http://localhost:$DATAPREP_SERVICE_PORT/v1/dataprep/ingest \ -H "Content-Type: application/json" \ -d '{ "file_dir": "/path/to/directory", "frame_extract_interval": 15, "do_detect_and_crop": true }' ``` **For Single File:** ```curl curl -X POST http://localhost:$DATAPREP_SERVICE_PORT/v1/dataprep/ingest \ -H "Content-Type: application/json" \ -d '{ "file_path": "/path/to/file", "meta": { "key": "value" }, "frame_extract_interval": 15, "do_detect_and_crop": true }' ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the ingestion process has started or completed. #### Response Example { "message": "File ingestion initiated successfully." } ``` ```APIDOC ## GET /v1/dataprep/get ### Description Retrieves information about a specific file that has been ingested. ### Method GET ### Endpoint /v1/dataprep/get ### Parameters #### Query Parameters - **file_path** (string) - Required - The path to the file for which to retrieve information. ### Request Example ```curl curl -X GET http://localhost:$DATAPREP_SERVICE_PORT/v1/dataprep/get?file_path=/path/to/file ``` ### Response #### Success Response (200) - **file_info** (object) - Information about the requested file. - **path** (string) - The path of the file. - **metadata** (object) - Metadata associated with the file. - **processing_status** (string) - The current processing status of the file. #### Response Example { "file_info": { "path": "/path/to/file", "metadata": { "key": "value" }, "processing_status": "completed" } } ``` ```APIDOC ## DELETE /v1/dataprep/delete ### Description Deletes a specific file from the system's database. Note that this only removes the record from the database, not the actual file from the host system. ### Method DELETE ### Endpoint /v1/dataprep/delete ### Parameters #### Query Parameters - **file_path** (string) - Required - The path to the file to be deleted from the database. ### Request Example ```curl curl -X DELETE http://localhost:$DATAPREP_SERVICE_PORT/v1/dataprep/delete?file_path=/path/to/file ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the file has been deleted from the database. #### Response Example { "message": "File deleted successfully from the database." } ``` ```APIDOC ## DELETE /v1/dataprep/delete_all ### Description Clears the entire database, removing all ingested file records. ### Method DELETE ### Endpoint /v1/dataprep/delete_all ### Parameters None ### Request Example ```curl curl -X DELETE http://localhost:$DATAPREP_SERVICE_PORT/v1/dataprep/delete_all ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the database has been cleared. #### Response Example { "message": "Database cleared successfully." } ``` -------------------------------- ### Run Docker Container for Video Summary UI Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/sample-applications/video-search-and-summarization/ui/react/README.md Starts a Docker container from the previously built image, exposing the UI on a specified port. Replace `` with the desired port number. ```bash docker run -p :80 ``` -------------------------------- ### Production Setup Example (Bash) Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/vlm-openvino-serving/docs/user-guide/environment-variables.md Configuration for a production environment, focusing on optimized performance, reduced logging, and specific resource limits. Includes setting model, device, log level, access log file, completion tokens, and OV config. ```bash # Production configuration with clean logging export VLM_MODEL_NAME=Qwen/Qwen2.5-VL-3B-Instruct export VLM_DEVICE=CPU export VLM_LOG_LEVEL=warning export VLM_ACCESS_LOG_FILE="/dev/null" export VLM_MAX_COMPLETION_TOKENS=1000 export OV_CONFIG='{"PERFORMANCE_HINT": "THROUGHPUT", "NUM_STREAMS": 2}' source setup.sh ``` -------------------------------- ### Clone Repository and Navigate to Docker Directory Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/dlstreamer-pipeline-server/docs/user-guide/get-started.md This snippet demonstrates how to clone the Edge-AI-Libraries repository and change the directory to the DL Streamer Pipeline Server's docker folder. It requires Git to be installed and a working directory specified. ```sh cd [WORKDIR] git clone https://github.com/open-edge-platform/edge-ai-libraries.git cd edge-ai-libraries/microservices/dlstreamer-pipeline-server/docker ``` -------------------------------- ### Test POST Specific Device Details Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/vlm-openvino-serving/docs/user-guide/get-started.md This example shows how to request detailed information for a specific device. It uses a POST request to the /device endpoint, specifying the desired device in the query parameters. ```bash curl --location --request POST 'http://localhost:9764/device?device=GPU' \ --header 'Content-Type: application/json' ``` -------------------------------- ### Continuous Chat Test using curl Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/vlm-openvino-serving/docs/user-guide/get-started.md Demonstrates how to perform a continuous chat test using a cURL command to interact with the chat completions API. It includes example messages and model parameters for a conversation flow. ```bash curl --location 'http://localhost:9764/v1/chat/completions' \ --header 'Content-Type: application/json' \ --data '{ \ "model": "microsoft/Phi-3.5-vision-instruct", \ "messages": [ \ {\"role\": \"user\", \ "content": \"Describe this video and remember this number: 4245\" \ }, \ {\"role\": \"assistant\", \ "content": \"The video appears to be taken at night, as indicated by the darkness and artificial lighting. The timestamp on the video suggests it was recorded early in the morning on August 25, 2024, in the Eastern Time Zone (ET). The camera is labeled indicates that it is a body-worn camera used by law enforcement.\n\n The scene shows a sidewalk bordered by a metal fence on both sides. There are trees lining the sidewalk, and some people can be seen walking in the distance. In the background, there are parked cars and what appears to be a building with illuminated windows. The overall atmosphere seems calm, with no immediate signs of distress or urgency.\n\n Remember the number: 4245\" \ }, \ {\"role\": \"user\", \ "content": \"What is the number ?\" \ } \ ], \ "max_completion_tokens": 1000 \ }' ``` -------------------------------- ### Source Setup Script in Bash Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/sample-applications/document-summarization/docs/user-guide/get-started.md Runs the setup.sh script to configure additional environment variables. Requires the script to be executable in the directory. No direct inputs; outputs configured environment. Limitations: Assumes script exists and is correct. ```bash source ./setup.sh ``` -------------------------------- ### Execute Sample Deep Learning Streamer Pipeline Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/libraries/dl-streamer/docs/source/get_started/install/install_guide_ubuntu_wsl2.md Shell commands to source the Deep Learning Streamer environment setup script and then execute a sample pipeline using the CPU as the target device. ```bash source /opt/intel/dlstreamer/scripts/setup_dls_env.sh /opt/intel/dlstreamer/scripts/hello_dlstreamer.sh --device=CPU ``` -------------------------------- ### Run RTmotion Example (Bash) Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/libraries/edge-control-libraries/plcopen-motion-control/docs/rt-motion/rt-motion.rst This bash script demonstrates how to navigate to the build directory and execute the RTmotion example program. It requires a pre-built executable and allows specifying CPU core isolation and runtime duration. ```bash # A runable should has already been build in this folder cd /build/src # Argument parameters: # -c : Index of CPU core isolated for real-time tasks # -t : The expected time to run this example (s) taskset -c multi-axis -t ``` -------------------------------- ### Create Project Directory Structure with Bash Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/tools/visual-pipeline-and-platform-evaluation-tool/docs/user-guide/get-started.md Creates the necessary directory structure for the Visual Pipeline and Platform Evaluation Tool project. This includes parent directories for models and shared resources. The commands ensure parent directories are created as needed and then navigate into the project root. ```bash mkdir -p visual-pipeline-and-platform-evaluation-tool/models mkdir -p visual-pipeline-and-platform-evaluation-tool/shared/models cd visual-pipeline-and-platform-evaluation-tool ``` -------------------------------- ### List Supported Pipelines Response - JSON Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/dlstreamer-pipeline-server/docs/user-guide/advanced-guide/detailed_usage/rest_api/restapi_reference_guide.md Example JSON response from the GET /pipelines endpoint. Returns an array of available pipeline definitions with descriptions, types (e.g., GStreamer), and parameter schemas. Used to discover pipeline capabilities before instantiation. ```json [ { "description": "description", "type": "GStreamer", "parameters": { "key": { "default": "" } } } ] ``` -------------------------------- ### Execute Docker Setup Script for Audio Analyzer Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/audio-analyzer/docs/user-guide/how-to-build-from-source.md Navigates to the audio-analyzer microservice directory, makes the setup script executable, and runs it to build and launch the production Docker environment, including a Minio server. ```bash cd edge-ai-libraries/microservices/audio-analyzer chmod +x ./setup_docker.sh ./setup_docker.sh ``` -------------------------------- ### Test Video Input with Base64 Encoded Video Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/vlm-openvino-serving/docs/user-guide/get-started.md This example demonstrates how to send a base64 encoded video as input to the API for processing. It is compatible with Qwen/Qwen2.5-VL-7B-Instruct and Qwen/Qwen2-VL-2B-Instruct models. Optional parameters like max_pixels and fps are not included but can be added. ```bash curl --location 'http://localhost:9764/v1/chat/completions' \ --header 'Content-Type: application/json' \ --data '{ \ "model": "Qwen/Qwen2.5-VL-7B-Instruct", \ "messages": [ \ { \ "role": "user", \ "content": [ \ { \ "type": "text", \ "text": "Describe this video" \ }, \ { \ "type": "video_url", \ "video_url": { \ "url": "data:video/mp4;base64,{video_base64}" \ } \ } \ ] \ } \ ], \ "max_completion_tokens": 1000, \ "stream":true \ }' ``` -------------------------------- ### GPU Acceleration Setup (Bash) Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/sample-applications/video-search-and-summarization/docs/user-guide/get-started.md Enables GPU acceleration for different components of the application. Includes settings for VLM inference, OpenVINO model server summarization, and vclip-embedding-ms for search. Also shows how to verify GPU configuration without running the application. ```bash ENABLE_VLM_GPU=true source setup.sh --summary ENABLE_OVMS_LLM_SUMMARY_GPU=true source setup.sh --summary ENABLE_EMBEDDING_GPU=true source setup.sh --search # For VLM inference on GPU ENABLE_VLM_GPU=true source setup.sh --summary config # For OVMS inference on GPU ENABLE_OVMS_LLM_SUMMARY_GPU=true source setup.sh --summary config # For vclip-embedding-ms on GPU ENABLE_EMBEDDING_GPU=true source setup.sh --search config ``` -------------------------------- ### Set VLM Model Name Environment Variable Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/vlm-openvino-serving/docs/user-guide/get-started.md Exports the required VLM_MODEL_NAME environment variable to specify the vision-language model for the microservice. Refer to the supported models list for valid options. This is the first step in environment setup before running the service. ```bash export VLM_MODEL_NAME=Qwen/Qwen2.5-VL-3B-Instruct ``` -------------------------------- ### Build Docker Image for Video Summary UI Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/sample-applications/video-search-and-summarization/ui/react/README.md Builds a Docker image for the Video Summary UI application. This command should be executed from the `ui/react` directory of the project. ```bash docker build -t . ``` -------------------------------- ### Video Input Test using curl Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/vlm-openvino-serving/docs/user-guide/get-started.md This cURL example demonstrates how to send video data as input to the chat completions API. It specifies the 'video' type within the messages content, expecting the model to process it as frames of a single video. ```bash curl --location 'http://localhost:9764/v1/chat/completions' \ --header 'Content-Type: application/json' \ --data '{ \ "model": "microsoft/Phi-3.5-vision-instruct", \ "messages": [ \ {\"role\": \"user\", \ "content": [ \ {\"type\": \"text\", \ "text": \"Consider these images as frames of single video. Describe this video and sequence of events.\" \ }, \ {\"type\": \"video\", \ "video": [ \ \"http://localhost:8080/chunk_6_frame_3.jpeg\", \ \"http://localhost:8080/chunk_6_frame_4.jpeg\" \ ] \ } \ ] \ } \ ], \ "max_completion_tokens": 1000 \ }' ``` -------------------------------- ### GET /device Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/vlm-openvino-serving/docs/user-guide/get-started.md Retrieves a list of available devices on the system. ```APIDOC ## GET /device ### Description Retrieves a list of available devices on the system. ### Method GET ### Endpoint `/device` ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl --location --request GET 'http://localhost:9764/device' ``` ### Response #### Success Response (200) - **devices** (array) - A list of available device names. #### Response Example ```json [ "CPU", "GPU" ] ``` ``` -------------------------------- ### Download Project Files with Bash Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/tools/visual-pipeline-and-platform-evaluation-tool/docs/user-guide/get-started.md Downloads all required configuration and script files for the Visual Pipeline and Platform Evaluation Tool using curl. This includes Docker Compose configuration, Make targets, Dockerfile, model manager script, and supported models list. Sets executable permissions on the model manager script. ```bash curl -LO "https://github.com/open-edge-platform/edge-ai-libraries/raw/refs/heads/main/tools/visual-pipeline-and-platform-evaluation-tool/setup_env.sh" curl -LO "https://github.com/open-edge-platform/edge-ai-libraries/raw/refs/heads/main/tools/visual-pipeline-and-platform-evaluation-tool/compose.yml" curl -LO "https://github.com/open-edge-platform/edge-ai-libraries/raw/refs/heads/main/tools/visual-pipeline-and-platform-evaluation-tool/Makefile" curl -Lo models/Dockerfile "https://github.com/open-edge-platform/edge-ai-libraries/raw/refs/heads/main/tools/visual-pipeline-and-platform-evaluation-tool/models/Dockerfile" curl -Lo models/model_manager.sh "https://github.com/open-edge-platform/edge-ai-libraries/raw/refs/heads/main/tools/visual-pipeline-and-platform-evaluation-tool/models/model_manager.sh" curl -Lo shared/models/supported_models.lst "https://github.com/open-edge-platform/edge-ai-libraries/raw/refs/heads/main/tools/visual-pipeline-and-platform-evaluation-tool/shared/models/supported_models.lst" chmod +x models/model_manager.sh ``` -------------------------------- ### Deploy Edge AI Services with Milvus Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/visual-data-preparation-for-retrieval/milvus/docs/user-guide/get-started.md This sequence of commands deploys the Edge AI services along with Milvus. It involves navigating to the deployment directory, setting the EMBEDDING_MODEL_NAME environment variable, sourcing the env.sh script, and finally starting the services using Docker Compose. The 'docker compose ps' command is used to verify the status of the running services. ```bash cd deployment/docker-compose/ export EMBEDDING_MODEL_NAME="CLIP/clip-vit-h-14" # Replace with your preferred model source env.sh docker compose -f compose_milvus.yaml up -d docker compose -f compose_milvus.yaml ps ``` -------------------------------- ### Multi-GPU Setup Example (Bash) Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/vlm-openvino-serving/docs/user-guide/environment-variables.md Configuration for utilizing a specific GPU device with custom performance settings and cache directory. Includes setting the model, device, and OV config. ```bash # Specific GPU device with custom configuration export VLM_MODEL_NAME=Qwen/Qwen2.5-VL-3B-Instruct export VLM_DEVICE=GPU.0 export OV_CONFIG='{"PERFORMANCE_HINT": "THROUGHPUT", "CACHE_DIR": "/tmp/ov_cache"}' source setup.sh ``` -------------------------------- ### Installation Rules for Executable and Launch Files Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/libraries/robotics-ai-libraries/motion-control-gateway/robot_arm/hiwin/run_hiwin_plc_acrn/CMakeLists.txt Specifies installation rules for the built executable and the launch directory. The executable is installed in 'lib/' and the launch files in 'share/', making the built components accessible after installation. ```cmake install(TARGETS run_hiwin_plc DESTINATION lib/${PROJECT_NAME} ) install(DIRECTORY launch DESTINATION share/${PROJECT_NAME} ) ``` -------------------------------- ### Retrieve Pipeline Instance Status Response - JSON Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/dlstreamer-pipeline-server/docs/user-guide/advanced-guide/detailed_usage/rest_api/restapi_reference_guide.md Example JSON response from the GET /pipelines/{instance_id}/status endpoint. Returns detailed metrics for a single pipeline instance including state, performance counters, and diagnostic messages. Used for targeted monitoring and troubleshooting. ```json { "id": 1, "state": "COMPLETED", "avg_fps": 8.932587737800183, "start_time": 1638179813.2005367, "elapsed_time": 72.43142008781433, "message": "", "avg_pipeline_latency": 0.4533823041311556 } ``` -------------------------------- ### Query All Pipeline Status Response - JSON Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/dlstreamer-pipeline-server/docs/user-guide/advanced-guide/detailed_usage/rest_api/restapi_reference_guide.md Example JSON response from the GET /pipelines/status endpoint. Provides real-time execution metadata for all pipeline instances including state, average FPS, timing statistics, and error messages. Enables bulk monitoring of concurrent pipelines. ```json [ { "id": 1, "state": "COMPLETED", "avg_fps": 8.932587737800183, "start_time": 1638179813.2005367, "elapsed_time": 72.43142008781433, "message": "", "avg_pipeline_latency": 0.4533823041311556 }, { "id": 2, "state": "RUNNING", "avg_fps": 6.366260838099841, "start_time": 1638179886.3203313, "elapsed_time": 16.493194580078125, "message": "", "avg_pipeline_latency": 0.6517487730298723 }, { "id": 3, "state": "ERROR", "avg_fps": 0, "start_time": null, "elapsed_time": null, "message": "Not Found (404), URL: https://github.com/intel-iot-devkit/sample.mp4, Redirect to: (NULL)" } ] ``` -------------------------------- ### Install WSL and Ubuntu 24.04 on Windows Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/libraries/dl-streamer/docs/source/get_started/install/install_guide_ubuntu_wsl2.md Commands to install or update Windows Subsystem for Linux (WSL) and specifically install Ubuntu 24.04 LTS as the default distribution. ```bash wsl --install wsl --update ``` ```bash wsl --install Ubuntu-24.04 wsl --set-default Ubuntu-24.04 ``` -------------------------------- ### Basic CMake Project Setup Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/libraries/robotics-ai-libraries/motion-control-gateway/robot_arm/hiwin/hiwin_ros/hiwin_xeg_32_support/CMakeLists.txt Initializes a CMake project with a minimum required version and sets the project name. This is a standard starting point for CMake-based projects. ```cmake cmake_minimum_required(VERSION 2.8.3) project(hiwin_xeg_32_support) ``` -------------------------------- ### Set Remote Registry for Docker Images Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/visual-data-preparation-for-retrieval/milvus/docs/user-guide/get-started.md This snippet demonstrates how to set environment variables to use remote prebuilt Docker images instead of building from source. It exports the registry and tag to be used. This is an alternative to the build process described in other snippets. ```bash export REGISTRY="intel/" export TAG="latest" ``` -------------------------------- ### Run Microservice with Docker Compose Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/microservices/multimodal-embedding-serving/docs/user-guide/get-started.md Starts the Multimodal Embedding Serving microservice using Docker Compose by up-ing the services defined in the `docker/compose.yaml` file. ```bash docker compose -f docker/compose.yaml up ``` -------------------------------- ### Setup APT repositories for Ubuntu 22 Source: https://github.com/open-edge-platform/edge-ai-libraries/blob/main/libraries/dl-streamer/docs/source/get_started/install/install_guide_ubuntu.md Configures Intel's APT repositories for Deep Learning Streamer and OpenVINO on Ubuntu 22. Adds GPG keys for package verification and creates repository list entries. Requires root privileges for system configuration. ```bash sudo -E wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/intel-gpg-archive-keyring.gpg > /dev/null sudo -E wget -O- https://apt.repos.intel.com/edgeai/dlstreamer/GPG-PUB-KEY-INTEL-DLS.gpg | sudo tee /usr/share/keyrings/dls-archive-keyring.gpg > /dev/null echo "deb [signed-by=/usr/share/keyrings/dls-archive-keyring.gpg] https://apt.repos.intel.com/edgeai/dlstreamer/ubuntu22 ubuntu22 main" | sudo tee /etc/apt/sources.list.d/intel-dlstreamer.list sudo bash -c 'echo "deb [signed-by=/usr/share/keyrings/intel-gpg-archive-keyring.gpg] https://apt.repos.intel.com/openvino/2025 ubuntu22 main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2025.list' ```