Failed to create camera provider from aws greengrass lambda with CSI

Hello,

Invoked ‘deepstream-app’ in a greengrass lambda but failed to create camera provider. Any hints will be appreciated.

Below is the command line invoked by python:

bash_command = "./deepstream-app -c ./source1_csi_dec_infer_resnet_fp16_localpath.txt"
process = subprocess.Popen(bash_command.split(), stdout=subprocess.PIPE)
output, error = process.communicate()
print(output, error)

Below is the log file:

[2020-08-02T11:41:05.03+09:00][DEBUG]-IoTDataPlane.py:126,Publishing message on topic “greengrass-deepstream-app/heartbeat” with Payload “RTSP Heart beat signal sent from Greengrass Core running on pla
tform: Linux-4.9.140-tegra-aarch64-with-Ubuntu-18.04-bionic”
[2020-08-02T11:41:05.031+09:00][DEBUG]-Lambda.py:96,Invoking Lambda function “arn:aws:lambda:::function:GGRouter” with Greengrass Message “RTSP Heart beat signal sent from Greengrass Core running on pl
atform: Linux-4.9.140-tegra-aarch64-with-Ubuntu-18.04-bionic”
[2020-08-02T11:41:05.031+09:00][INFO]-ipc_client.py:167,Posting work for function [arn:aws:lambda:::function:GGRouter] to http://localhost:8000/2016-11-01/functions/arn:aws:lambda:::function:GGRouter
[2020-08-02T11:41:05.036+09:00][INFO]-ipc_client.py:177,Work posted with invocation id [d169502c-0bb3-4711-4a5a-f9ce021b3bc8]
[2020-08-02T11:41:06.209+09:00][ERROR]-2020-08-02 11:41:06.209408: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.2
[2020-08-02T11:41:06.976+09:00][ERROR]-(deepstream-app:10): GLib-GObject-WARNING : 11:41:06.976: g_object_set_is_valid_property: object class ‘GstNvArgusCameraSrc’ has no property named ‘maxperf’
[2020-08-02T11:41:11.415+09:00][ERROR]-0:00:06.326112099 10 0x4d0f2f0 INFO nvinfer gstnvinfer.cpp:602:gst_nvinfer_logger:<primary_gie> NvDsInferContext[
UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1577> [UID = 1]: deserialized trt engine from :/lambda/Primary_Detector/resnet10.caffemodel_b1_gpu0_fp1
6.engine
[2020-08-02T11:41:11.415+09:00][ERROR]-0:00:06.326323926 10 0x4d0f2f0 INFO nvinfer gstnvinfer.cpp:602:gst_nvinfer_logger:<primary_gie> NvDsInferContext[
UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1681> [UID = 1]: Use deserialized engine model: /lambda/Primary_Detector/resnet10.caffemodel_b1_gpu0_fp16.en
gine
[2020-08-02T11:41:11.588+09:00][ERROR]-0:00:06.499514536 10 0x4d0f2f0 INFO nvinfer gstnvinfer_impl.cpp:311:notifyLoadModelStatus:<primary_gie> [UID 1]:
Load new model:/lambda/config_infer_localpath.txt sucessfully
[2020-08-02T11:41:11.591+09:00][ERROR]-(Argus) Error FileOperationFailed: Connecting to nvargus-daemon failed: No such file or directory (in src/rpc/socket/client/SocketClientDispatch.cpp, function ope
nSocketConnection(), line 201)
[2020-08-02T11:41:11.591+09:00][ERROR]-(Argus) Error FileOperationFailed: Cannot create camera provider (in src/rpc/socket/client/SocketClientDispatch.cpp, function createCameraProvider(), line 102)
[2020-08-02T11:41:11.591+09:00][ERROR]-Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:551 Failed to create CameraProvider
[2020-08-02T11:41:11.599+09:00][ERROR]-NvMMLiteOpen : Block : BlockType = 4
[2020-08-02T11:41:11.6+09:00][ERROR]-===== NVMEDIA: NVENC =====
[2020-08-02T11:41:11.601+09:00][ERROR]-NvMMLiteBlockCreate : Block : BlockType = 4
[2020-08-02T11:41:13.01+09:00][INFO]-run_deepstream.py:46,(’\n *** DeepStream: Launched RTSP Streaming at rtsp://localhost:8554/ds-test \n\nOpening in BLOCKING MODE \nINFO: [Implicit Engine Info]: l
ayers num: 3\n0 INPUT kFLOAT input_1 3x368x640 \n1 OUTPUT kFLOAT conv2d_bbox 16x23x40 \n2 OUTPUT kFLOAT conv2d_cov/Sigmoid 4x23x40 \n\n\nRuntime commands:\n\th:
Print this help\n\tq: Quit\n\n\tp: Pause\n\tr: Resume\n\nNOTE: To expand a source in the 2D tiled display and view object details, left-click on the source.\n To go back to the tiled display, righ
t-click anywhere on the window.\n\n
INFO: <bus_callback:181>: Pipeline ready\n\n
INFO: <bus_callback:167>: Pipeline running\n\n
* INFO: <bus_callback:204>: Received EOS. Exiting …\n\nQuitting\nAp
p run successful\n’, None)
[2020-08-02T11:41:13.011+09:00][INFO]-lambda_runtime.py:147,Running [arn:aws:lambda:ap-northeast-1:042083552617:function:greengrass-deepstream-04208355-DeepstreamAppLambda-1QIZMKLLSX9P5:9]
[2020-08-02T11:41:13.011+09:00][INFO]-ipc_client.py:192,Getting work for function [arn:aws:lambda:ap-northeast-1:042083552617:function:greengrass-deepstream-04208355-DeepstreamAppLambda-1QIZMKLLSX9P5:9
] from http://localhost:8000/2016-11-01/functions/arn:aws:lambda:ap-northeast-1:042083552617:function:greengrass-deepstream-04208355-DeepstreamAppLambda-1QIZMKLLSX9P5:9/work
[2020-08-02T11:41:25.191+09:00][INFO]-lambda_runtime.py:364,Caught signal 15. Stopping runtime.

With the following config files:

config_infer_localpath.txt (3.0 KB)
source1_csi_dec_infer_resnet_fp16_localpath.txt (2.0 KB)

It works well with these 2 configuration files if I execute deepstream-app under ssh or desktop’s terminal.