Skip to content

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 instances folder, when calling run.sh this folder is automatically mounted at /opt/cvedia-rt/instances/. 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_solutions.sh, solutions will be placed at solutions folder, which is automatically mounted within the container next time you call run.sh.

Running as daemon (background)

You can run CVEDIA-RT in the background with -d, this will create a container and run it as a service within docker. Note that the logs from this won't be available at logs/ folder, instead they will be available only within docker logs

run.sh parameters

Options

-h, --help: Shows this message and exit

-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.

-b, --benchmark <model uri>: Benchmark model uri

-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_)

-T, --hostname <name>: Sets a custom hostname to the CVEDIA-RT container (default is --name)

-X, --external <name>: Runs an external script from bin.cvedia.com instead of main entrypoint

-l, --lib <path0:path1:pathN>: Defines one or more local paths (: delimited) to search for libraries

-g, --gst_plugins <path0:path1:pathN>: Defines one or more local paths (: delimited) to search for GStreamer plugins

-a, --gst_plugins_auto: Automatically mount GStreamer plugins from your local /usr/lib/gstreamer-1.0

-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_exporters: Do not mount exporters folder (exporters/)

--skip_config: Do not use .config for environment variables

--skip_camera: Do not mount local cameras (/dev/video*)

--force_camera: Force camera setup even if cameras are not currently connected

--skip_nvidia_check: Skip NVIDIA checks for nvidia docker runtime (not recommended)

--skip_hailo: Do not mount hailo devices (/dev/hailo*)

--force_hailo: Force hailo even when it's not detected

--skip_rockchip: Do not try to set rockchip device frequency governor

--force_rockchip: Force rockchip even when it's not detected

--skip_qualcomm: Do not mount qualcomm dsp snpe dependencies (/dsp, /vendor)

--force_qualcomm: Force qualcomm even when it's not detected

-P, --skip_privileged: Do not run docker in privileged mode, may break some features

--privileged: Force privileged mode

--skip_jetpack_check: Do not check for jetpack version (not recommended)

--trt_affinity <value>: Set TensorRT affinity (for NVIDIA/Jetson only), possible values are 7, 8, 8.4 (default is automatic)

-q, --quick: Quicker less verbose startup

-e, --extract: Extract solutions to solutions/ folder and exit

--extract_exporters: Extract exporters to exporters/ folder end exit

--mm <option / file path>: Defines a custom memory manager library to use (Native options: mimalloc (default), tcmalloc or a path to a file; This option adds to LD_PRELOAD)

--nice <value>: Defines a custom nice value for CVEDIA-RT main process, default is automatic

--taskset <value>: Defines a custom taskset cpu list for CVEDIA-RT main process, default automatic

--blacklist <value0,value1,..>: Defines one or more CVEDIA-RT plugins to blacklist (, delimited)

-v, --version: Prints version and exit

UI options

-m, --remote: Run in remote rendering mode (requires a client to connect to GUI)

-K, --renderer <backend>: Set the rendering backend, possible options are:

glfw: OpenGL (default)

sdl: Linux SDL2 (not supported in all platforms)

remote: Remote rendering (requires a client to connect to GUI) -- same as --remote

--ui_port <port>: Port to expose UI when running with --renderer remote, default: 8889; Use 0 to disable exposing.

--ui_discovery_port <port>: Automatic CVEDIA-RT discovery port. Default: 12349 (UDP); Use 0 to disable exposing.

Service options

--api_port <port>: Port to expose 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; Ignored when --disable_mqtt is set.

-E, --no_expose: Do not expose any service or port; This overrides all other service / port expose options.

--disable_mqtt: Disable internal MQTT service

--use_image_rest_ep: Enables syncronous image rest ingestion endpoint. Requires internal MQTT service.

--intent <value>: Docker intent, possible options are:

run: Run the container (default)

create: Create the container but do not start it

VMS options

--nxw: Enable NXWitness full integration mode

--nxw_port <port>: Port to expose NXW service, default: 7001; Use 0 to disable exposing; Ignored when --nxw is not set.

--skip_nxw_host: Disables NXWitness discovery (will run docker without --network host)

--mtv: Enable NXWitness META VMS full integration mode

--mtv_port <port>: Port to expose NXWitness META VMS service, default: 7001; Use 0 to disable exposing; Ignored when --mtv is not set.

--skip_mtv_host: Disables NXWitness META VMS discovery (will run docker without --network host)

--dwg: Enable Digital Watchdog full integration mode

--dwg_port <port>: Port to expose Digital Watchdog service, default: 7001; Use 0 to disable exposing; Ignored when --dwg is not set.

--skip_dwg_host: Disables Digital Watchdog discovery (will run docker without --network host)

--hwv: Enable Hanwha WAVE full integration mode

--hwv_port <port>: Port to expose Hanwha WAVE service, default: 7001; Use 0 to disable exposing; Ignored when --hwv is not set.

--skip_hwv_host: Disables Hanwha WAVE discovery (will run docker without --network host)

--pik: Enable Cook Security Piko full integration mode

--pik_port <port>: Port to expose Cook Security Piko service, default: 7001; Use 0 to disable exposing; Ignored when --pik is not set.

--skip_pik_host: Disables Cook Security Piko discovery (will run docker without --network host)

--vms-install-url <url>: Overwrites VMS install url deb package

--vms-install-file <path/to/file.deb>: Overwrites VMS install deb package

--vms-update: Update / Reinstall VMS even when installed folder exist

Notes on VMS integration:

  • Only one VMS integration can be enabled at once

  • Some VMS images might not be available depending on your CVEDIA-RT distribution

  • When running in VMS mode it's recommended to use host networking for instance discoverability

  • VMS integration require a third party license

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 1) possible values are:

0 none, 1 error, 2 warning, 3 fixme, 4 info, 5 debug, 6 log, 7 trace, 9 memdump

--add_symbols <path>: When available, fuse symbols with existing binaries (path defaults to /opt/cvedia-rt)

--expose_tracy: Expose tracy debug

--tracy_port: Defines tracy port, default 8086

--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

--ld_preload_method <method>: Switches from global LD_PRELOAD (method 0 - default) to local LD_PRELOAD (method 1)

--disable_ld_preload: Disable automatic ld_preload of specific libraries within docker (will disable memory manager)

Licensing options

--activate <license>: Activates one or more licenses (comma delimited) and exits

--license <license>: Activates one or more licenses (comma delimited) and executes CVEDIA-RT / VMS

Option delimiters

First set of options are sent to this wrapper, adding a -- pipes options to the docker daemon.

Adding a second -- will pipe options to cvedia-rt binary itself.

Examples

Run without updating:

./run.sh -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: first set of options are sent to this wrapper, options after the first -- are sent to the docker

and options after the second -- are sent to cvedia-rt runtime binary.

Run with remote ui with custom mounts and custom runtime options:

./run.sh --remote -U -- -v /some/path/:/path/in/docker --some-docker-option -- --some-cvedia-rt-engine-option value

CVEDIA-RT Main application - Process Parameters

-s, --solutions: Path containing the folder of the solutions. Default value: solutions

-d: This parameter allows overriding the instance JSON configurations with the command line

--render : Select UI rendering engine: GLFW, SDL, DX11 or Remote

--version: Prints the version and exits

--dev: Enables developer mode

--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 a custom securt instance

./run.sh -c runinstance -- -- -b solutions/securt -c "instances/My Instances/test.json" -v

Running on Windows

rtstudio.exe - Main application - Process Parameters

Use rtstudio.exe --help for the most up-to- date options.

rtstudio.exe [OPTIONS]

OPTIONS:
  -h,     --help              Print this help message and exit
  -s,     --solutions TEXT:DIR [C:/ProgramData/CVEDIA/CVEDIA-RT/files/solutions]
                              Path to the AI solutions folder
  -i,     --instances TEXT:DIR [C:/ProgramData/CVEDIA/CVEDIA-RT/files/instances]
                              Path to the instances folder
          --render TEXT:{GLFW,SDL,DX11,Remote} [GLFW]
                              Select UI rendering engine
          --version           Print version
          --dev               Enable developer mode

Logging:
          --log-level TEXT:{verbose,debug,info,warning,error,fatal} (Env:RT_LOG_LEVEL)
                              Set log level
          --log-file TEXT (Env:RT_LOG_FILE)
                              Set log file
          --log-console       Enable console loggin

rtservice.exe - Run RT Server - Process Parameters

Use rtservice.exe --help for the most up-to- date options.

rtservice.exe [OPTIONS]

OPTIONS:
  -h,     --help              Print this help message and exit
  -s,     --solutions TEXT:DIR [C:/ProgramData/CVEDIA/CVEDIA-RT/files/solutions]
                              Path to the AI solutions folder
  -i,     --instances TEXT:DIR [C:/ProgramData/CVEDIA/CVEDIA-RT/files/instances]
                              Path to the instances folder
  -d,     --daemon            Run as a Windows service
          --auto-discovery, --no-auto-discovery{false} [1]
                              RT auto discovery
          --version           Print version

Logging:
          --log-level TEXT:{verbose,debug,info,warning,error,fatal} [info]  (Env:RT_LOG_LEVEL)
                              Set log level
          --log-max-size INT [52428800]
                              Log file size at which to rotate the log
          --log-max-files INT [3]
                              Number of rotated logs to keep
          --log-file TEXT [cvediart.log]  (Env:RT_LOG_FILE)
                              Set log file
          --log-console       Enable console logging

Webserver:
          --webserver, --no-webserver{false} [1]
                              Enable webserver for REST API, Admin panel and HLS
          --webserver-host TEXT:IPV4 [0.0.0.0]
                              Host to listen on
          --webserver-port INT:INT in [1 - 65535] [3546]
                              Port to listen on

Performance:
          --pin-on-core       Assign a random but fixed CPU core to each instance
          --opencv-num-threads INT:INT in [-1 - 64] [0]
                              Number of threads to use for OpenCV

Plugins:
          --plugin-list       List all loaded plugins

runinstance.exe - Run single instance - Process Parameters

CVEDIA-RT framework provides 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.

Use runinstance.exe --help for the most up-to- date options.

Usage: CVEDIA-RT Run Instance [options...]

Options:
    -l, --lua              Lua instance script
    -c, --config           Instance config file location (i.e. instances/custom/instance.json) (Required)
    -b, --base             Solution folder location (i.e. solutions/mySolution/ (Required)
    -d                     Config overrides
    -v, --verbose          Shall log to console?
    --help                 This page

Example running a custom securt instance

.\runinstance.exe -b solutions/securt -c "instances/My Instances/test.json" -v