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
.
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
-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>
)
-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_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
-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
-v, --version: Prints version and exit
UI options:¶
-H, --headless: Run in headless mode (no GUI)
-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
- headless
: Headless rendering (no GUI) -- same as --headless
--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
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
--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
--disable_ld_preload: Disable automatic ld_preload of specific libraries within docker (will disable memory manager)
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¶
-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
--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 ./solutions/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
-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
--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 ./solutions/perimeter-security/thermal_pva_detection.json -v
Defining paths
Please use forward slashes (/) instead of backward slashes when defining paths for parameters.