Configuration

Below are different ways to configure the provided reference application for your environment.

Operation Parameters

The provided Helm chart is ready to be installed and ready for immediate use. It can also be configured at different levels. The first is at the application level, basically changing the parameters for the Helm chart. These are limited to configuring parameters such as message rate for the Perception (DeepStream) microservice or the location of the models for the Embedding Generation microservice. These configurable parameters should provide enough flexibility.

In the K8S deployment, you can use an override values file to modify components.

Below is an example override file where we can change the logging level of the Perception Microservice from the default 0 to 5 to show FPS details of the inference pipeline. You can modify the other parameters such as NGC resource details to swap the PGIE and SGIE models being used.

global: {}
metropolis-perception:
        applicationSpecs:
                metropolis-perception:
                        containers:
                                ucf-metropolis-perception-container:
                                env:
                                - name: TEST_MODE
                                        value: '0' # 0 - Pipeline run / 1 - Engine build phase
                                - name: APP_TYPE
                                        value: fsl # fsl/mtmc/ppl_analytics
                                - name: BROKER_TYPE
                                        value: redis # redis for now
                                - name: LOG_LEVEL
                                        value: '5' # 0-5 (5 to include fps), 99-100 for storing frames for additional debugging
                                - name: LOG_FILE
                                        value: /opt/storage # log file location
                                - name: BROKER_HOST
                                        value: redis-redis-svc # redis service host
                                - name: BROKER_PORT
                                        value: '6379' # redis service port
                                - name: BROKER_CHANNEL
                                        value: test # redis channel for ds metadata
                                - name: CONTROLLER_TOPIC
                                        value: system_config # redis channel for signals from flask
                        initContainers:
                        - args:
                                - until nc -zv -w 2 $(BROKER_ENDPOINT) $(BROKER_PORT); do echo 'Waiting for
                                broker services to be up'; done
                                command:
                                - sh
                                - -c
                                env:
                                - name: BROKER_ENDPOINT
                                value: redis-redis-svc # redis service host
                                - name: BROKER_PORT
                                value: '6379' # redis service port
                                image: busybox:stable
                                imagePullPolicy: IfNotPresent
                                name: check-broker-up
                        - args:
                                - "bash /app/scripts/download_data.sh; echo 'Building engine'; rm -rf ~/.cache/gstreamer-1.0;\
                                \ bash /app/scripts/start.sh; echo 'Engine built'; "
                                command:
                                - sh
                                - -c
                                env:
                                - name: NGC_CLI_API_KEY
                                valueFrom:
                                        secretKeyRef:
                                        key: NGC_CLI_API_KEY
                                        name: ngc-api-key-secret
                                        optional: false
                                - name: APP_TYPE
                                value: fsl # fsl/mtmc/ppl_analytics
                                - name: TEST_MODE
                                value: '1' # 0 - Pipeline run / 1 - Engine build phase
                                - name: DETECTOR_URL
                                value: nfgnkvuikvjm/mdx-v1_0/retail_detector:1 # NGC resource url for PGIE
                                - name: DETECTOR_NAME
                                value: efficientdet_v0.2.etlt # name for PGIE file
                                - name: EMBEDDER_URL
                                value: nfgnkvuikvjm/mdx-v1_0/retail_embedder:1 # NGC resource url for SGIE
                                - name: EMBEDDER_NAME
                                value: retailEmbedder.etlt # name for SGIE file
                                - name: LOG_LEVEL
                                value: '5' # 0-5 (5 to include fps), 99-100 for storing frames for additional debugging
                                image: nvcr.io/nfgnkvuikvjm/mdx-v1_0/mdx-perception:1.0
                                imagePullPolicy: Always
                                name: prepare-data

                logLevel: '5' # 0-5 (5 to include fps), 99-100 for storing frames for additional debugging
                logLocation: /opt/storage

A detailed file containing values for the FSL microservices is provided as application-helm-configs/FSL/fsl-app-values.yaml.