Build from Source#
NOTE : This is for advanced user only and we recommend pulling the already built image and running the application using it. See this to run the application without building.
This section shows how to build the Smart Route Planning Agent from source and run it along with all its dependencies.
Prerequisites#
Set the reasoning AI model to be used:
cd metro-ai-suite/smart-route-planning-agent/src
(Optional) Set tag for the image to be built:
export TAG=<build_tag> # e.g. dev-081726
This tag will be used for building the image locally and running the application. If not set, default tag
latestwould be used.Configure the Smart Traffic Intersection Agent Endpoints:
Edit
src/data/config.jsonto add the IP addresses and ports of the nodes where Smart Traffic Intersection Agents are running:{ "api_endpoint": "/api/v1/traffic/current/ws?images=false", "api_hosts": [ { "host": "ws://<node-1-ip>:<port>" }, { "host": "ws://<node-2-ip>:<port>" }, { "host": "ws://<node-3-ip>:<port>" } ] }
You can also configure only a single instance, but a minimum of three Smart Traffic Intersection Agent instances is recommended for proper route planning.
Build from Source and Run the Application#
Clone the application source code:
git clone --filter=blob:none --sparse --branch main https://github.com/open-edge-platform/edge-ai-suites.git
cd edge-ai-suites
git sparse-checkout set metro-ai-suite
cd metro-ai-suite/smart-route-planning-agent
Build the image from source and run the application suite:
source setup.sh --setup
This builds the intel/smart-route-planning-agent:<build_tag> image locally and runs the entire application suite.
If TAG variable is not set, image will be built as intel/smart-route-planning-agent:latest.
The UI URL is displayed when the application is successfully run: http://<host-ip>:7864. Open it in your browser to access the application.
Alternative Setup#
You can also first build the image and the run the application in following two separate steps:
Build the docker image:
source setup.sh --build
Once the image is built successfully, run the Smart Route Planning Agent along with its dependencies:
source setup.sh --run
Stop the Application#
To stop the application:
source setup.sh --stop
This will stop and remove all the containers for the application and its dependencies.