Running Options¶
CVEDIA-RT Allows different command line options to better customize the running environment. There are also extra command line applications that allow running customized and specific use cases.
Running on Linux with Docker¶
By default CVEDIA-RT runs within a container, the startup script run.sh
. This script allows you to set parameters to the docker engine and to cvedia-rt binary.
Local files
Running within docker implies that the filesystems are federated, if you want to run local files you can place them within the videos
folder, when calling run.sh
this folder is automatically mounted at /opt/cvedia-rt/videos/
. Alternatively you can mount any folder by sending parameters docker, check examples below.
Extracting solutions
When running within docker solutions are embedded into the images, if you want to make your changes permanent you have to extract them from within the docker image. Run ./extract_projects.sh
, solutions will be placed at projects
folder, which is automatically mounted within the container next time you call run.sh
.
run.sh
parameters¶
Options¶
-h, --help: Shows help and exit
-H, --headless: Run in headless mode (no GUI)
-B, --backends: List backends available and exit
-r, --runc: Runs using RUNC as docker runtime instead of trying to detect best runtime
-d, --daemon: Run container in background (default is foreground)
--gl <mode>: Set LIBGL indirect rendering, possible values are 0 or 1 (default is automatic) If you have issues starting CVEDIA-RT GUI, setting this value to 0 or 1.
-t, --tag <tag>: Overrides docker image path, including tag. This also disables automatic tag resolve.
-C, --no_cache: Delete model cache before starting
-L, --no_log: Do not save logs
-A, --arch <name>: Explicitly set the architecture to use (defaults to x86_64)
-Z, --dry_run: Do not run the application, just print the commands that would be executed
-M, --cmd <command>: Overrides docker run command (defaults to ./cvediart)
-R, --runtime <runtime>: Overrides docker runtime (defaults tries to detect best runtime)
-N, --name <name>: Sets a custom name to the CVEDIA-RT container (default is cvedia-rt_<random>
)
-U, --skip_update: Do not try to pull the latest version of the docker image
-k, --keep: Keep local caches when docker image is updated
--skip_mount: Do not use any persistent storage. This overrides all other mount options.
--skip_persistent: Do not mount persist folder (persist/)
--skip_camera: Do not mount local cameras (/dev/video*)
--skip_hailo: Do not mount hailo devices (/dev/hailo*)
--skip_config: Do not use .config for environment variables
-e, --extract: Extract projects to projects/ folder and exit
-v, --version: Prints version and exit
Service options¶
--rest_port <port>: Port to expose REST API, default: 8081; Use 0 to disable exposing.
--sapi_port <port>: Port to expose SAPI API, default: 8080; Use 0 to disable exposing.
--rtsp_port <port>: Port to expose RTSP stream, default: 8554; Use 0 to disable exposing.
--mqtt_port <port>: Port to expose MQTT service, default: 1883; Use 0 to disable exposing.
-E, --no_expose: Do not expose any service; This overrides all other service options.
--disable_mqtt: Disable internal MQTT service
Debug options¶
-I, --interactive: Drop to a shell within docker instead of executing cvedia-rt.
-D, --debug: Enable debug mode
-G, --gst_debug <level>: GST debug level (default is 2) possible values are: 0 none, 1 error, 2 warning, 3 fixme, 4 info, 5 debug, 6 log, 7 trace, 9 memdump
--core_dump_path <path>: Path to core dump folder (default is /tmp)
--core_dump_pattern_file <path>: Path to core dump pattern file (default is /proc/sys/kernel/core_pattern)
--disable_core_dump_persistence: Core dumps will be deleted after gdb analysis
Option delimiters
The first set of options is sent to this wrapper.
You can add --
to start a second set of option that will be sent to the docker daemon.
Adding a second --
will pipe the addtional options to cvedia-rt binary itself.
Examples¶
Run in headless mode skipping updates
./run.sh --headless -U
Run in debug mode without exposing ports
./run.sh --debug --no_expose
Run with explicit libgl indirect mode
./run.sh --gl 1
Run with custom docker options
./run.sh -- --env="MY_CUSTOM_VAR=VALUE" -v /my/custom/mount:/my/custom/mount -p 1234:1234
Note: Options after --
are sent to docker daemon
Run with custom runtime options
./run.sh -- -- --some-runtime-option
Note: the options set after the first --
are sent to the docker deamon, and options after the second --
are sent to cvedia-rt runtime binary.
Run headless with custom mounts and custom runtime options
./run.sh --headless -U -- -v /some/path/:/path/in/docker --some-docker-option -- --some-cvedia-rt-engine-option value
CVEDIA-RT Main application - Process Parameters¶
-p, --projects: Path containing the folder of the solutions. Default value: assets/projects
-d: This parameter allows overriding the instance JSON configurations with the command line
--headless: Runs without UI
--remote: Runs remote UI
--glfw: Runs UI using OpenGL
--sdl: Runs UI using SDL
--version: Prints the version and exits
--help : Show available command line parameters
Example running CVEDIA-RT with a different project path
./run.sh -- -- -p assets/my_projects/
CVEDIA-RT framework makes available a tool to run single instances called runinstance, without having to run the full application or UI, this tool is mainly used for edge devices, where the UI is not needed and processing capabilities are to be prioritized.
runinstance - Run a single instance - Process Parameters¶
-l, --lua: Main LUA instance script to execute
-c, --config: Path for instance JSON config file to run
-d: This parameter allows overriding the instance JSON configurations with the command line
-v, --verbose: This parameter allows viewing log information about the running instance
-s, --severity: Error level for the entry to include in the log: none = 0, fatal = 1, error = 2, warning = 3, info = 4, debug = 5, verbose = 6
--help: Show available command line parameters
Example running perimeter-security thermal_detection in headless mode
CVEDIA_RT_CMD="./runinstance" ./run.sh --headless -- -- -p ./assets/projects/perimeter-security/thermal_pva_detection.json -v
Running on Windows¶
CVEDIART.exe Main application - Process Parameters¶
--headless: Runs without UI
--remote: Runs remote UI
--glfw: Runs UI using OpenGL
--sdl: Runs UI using SDL
--version: Prints the version and exits
--help: Show available command line parameters
-p, --projects: Path containing the folder of the solutions. Default value: assets/projects
-d: This parameter allows overriding the instance JSON configurations with the command line
--help: Show available command line parameters
CVEDIA-RT framework makes available a tool to run single instances called runinstance, without having to run the full application or UI.
This tool is mainly used for edge devices, where the UI is not needed and processing capabilities are to be prioritized.
runinstance.exe - Run single instance - Process Parameters¶
-l, --lua: Main LUA instance script to execute
-c, --config: Path for instance JSON config file to run
-d: This parameter allows overriding the instance JSON configurations with the command line
-v, --verbose: This parameter allows viewing log information about the running instance
-s, --severity: Error level for the entry to include in the log: none = 0, fatal = 1, error = 2, warning = 3, info = 4, debug = 5, verbose = 6
--help: Show available command line parameters
Example running perimeter-security thermal_detection in headless mode
.\runinstance.exe -l assets/lua/index.lua -p ./assets/projects/perimeter-security/thermal_pva_detection.json -v
Defining paths
Please use forward slashes (/) instead of backward slashes when defining paths for parameters.