Hi, I am following below link to create IoT Edge setup
https://learn.microsoft.com/en-us/azure/iot-edge/how-to-provision-single-device-linux-symmetric?view=iotedge-1.4&tabs=azure-portal%2Cubuntu
https://learn.microsoft.com/en-us/azure/cognitive-services/computer-vision/spatial-analysis-container?tabs=azure-stack-edge
By following above links I am successfully able to create IoT Edge and IoT Hub in my azure VM.
But while deploying the spatial analysis module (Azure VM with GPU), the module is not deployed in my IoT Edge VM and the module running status is "Error" on IoT hub Portal and I getting below error
DeploymentManifest.json
{
"modulesContent": {
"$edgeAgent": {
"properties.desired": {
"modules": {
"spatialanalysis": {
"settings": {
"image": "mcr.microsoft.com/azure-cognitive-services/vision/spatial-analysis:latest",
"createOptions": "{\"HostConfig\":{\"Binds\":[\"/tmp/.X11-unix:/tmp/.X11-unix\"],\"Runtime\":\"nvidia\",\"ShmSize\":536870911,\"LogConfig\":{\"Type\":\"json-file\",\"Config\":{\"max-size\":\"100m\",\"max-file\":\"2000\"}}}}"
},
"type": "docker",
"env": {
"DISPLAY": {
"value": ":1"
},
"QT_X11_NO_MITSHM": {
"value": "1"
},
"ARCHON_LOG_LEVEL": {
"value": "info"
},
"ARCHON_SHARED_BUFFER_LIMIT": {
"value": "377487360"
},
"OMP_WAIT_POLICY": {
"value": "PASSIVE"
},
"EULA": {
"value": "accept"
},
"BILLING":{
"value": "https://computer-vision.cognitiveservices.azure.com/"
},
"APIKEY":{
"value": "{{key}}"
}
},
"status": "running",
"restartPolicy": "always",
"version": "1.0"
}
},
"runtime": {
"type": "docker",
"settings": {
"minDockerVersion": "v1.25"
}
},
"schemaVersion": "1.0",
"systemModules": {
"edgeAgent": {
"settings": {
"image": "mcr.microsoft.com/azureiotedge-agent:1.0",
"createOptions": ""
},
"type": "docker"
},
"edgeHub": {
"settings": {
"image": "mcr.microsoft.com/azureiotedge-hub:1.0",
"createOptions": "{\"HostConfig\":{\"PortBindings\":{\"443/tcp\":[{\"HostPort\":\"443\"}],\"5671/tcp\":[{\"HostPort\":\"5671\"}],\"8883/tcp\":[{\"HostPort\":\"8883\"}]}}}"
},
"type": "docker",
"status": "running",
"restartPolicy": "always"
}
}
}
},
"$edgeHub": {
"properties.desired": {
"routes": {
"route": "FROM /messages/* INTO $upstream"
},
"schemaVersion": "1.0",
"storeAndForwardConfiguration": {
"timeToLiveSecs": 7200
}
}
},
"spatialanalysis": {
"properties.desired": {
"globalSettings": {
"PlatformTelemetryEnabled": false,
"CustomerTelemetryEnabled": true
},
"graphs": {
"personcount": {
"operationId": "cognitiveservices.vision.spatialanalysis-personcount",
"version": 1,
"enabled": true,
"parameters": {
"VIDEO_URL": "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4",
"VIDEO_SOURCE_ID": "personcountgraph",
"VIDEO_DECODE_GPU_INDEX": 0,
"VIDEO_IS_LIVE":true,
"DETECTOR_NODE_CONFIG": "{ \"gpu_index\": 0 }",
"SPACEANALYTICS_CONFIG": "{\"zones\":[{\"name\":\"queue\",\"polygon\":[[0.0,0.0],[1.0,0.0],[1.0,1.0],[0.0,1.0],[0.0,0.0]], \"events\": [{\"type\":\"count\", \"config\":{\"trigger\": \"event\"}}]}]}"
}
}
}
}
},
"diagnostics": {
"properties.desired": {}
}
}
}
sudo az iot edge set-modules --hub-name "TEST-1" --device-id "TEST" --content DeploymentManifest.json
[
{
"authentication": {
"symmetricKey": {
"primaryKey": "{{primaryKey}}",
"secondaryKey": "{{secondaryKey}}"
},
"type": "sas",
"x509Thumbprint": {
"primaryThumbprint": null,
"secondaryThumbprint": null
}
},
"cloudToDeviceMessageCount": 0,
"connectionState": "Disconnected",
"connectionStateUpdatedTime": "0001-01-01T00:00:00+00:00",
"deviceId": "TEST",
"etag": "NDE0Mzg0Nw==",
"generationId": "{{generationId}}",
"lastActivityTime": "0001-01-01T00:00:00+00:00",
"managedBy": null,
"moduleId": "$edgeAgent"
},
{
"authentication": {
"symmetricKey": {
"primaryKey": "{{primaryKey}}",
"secondaryKey": "{{secondaryKey}}"
},
"type": "sas",
"x509Thumbprint": {
"primaryThumbprint": null,
"secondaryThumbprint": null
}
},
"cloudToDeviceMessageCount": 0,
"connectionState": "Connected",
"connectionStateUpdatedTime": "2023-02-13T09:10:04.694581+00:00",
"deviceId": "ROBOT-104",
"etag": "NDE0Mzg1MA==",
"generationId": "{{generationId}}",
"lastActivityTime": "0001-01-01T00:00:00+00:00",
"managedBy": null,
"moduleId": "$edgeHub"
},
{
"authentication": {
"symmetricKey": {
"primaryKey": "{{primaryKey}}",
"secondaryKey": "{{secondaryKey}}"
},
"type": "sas",
"x509Thumbprint": {
"primaryThumbprint": null,
"secondaryThumbprint": null
}
},
"cloudToDeviceMessageCount": 0,
"connectionState": "Disconnected",
"connectionStateUpdatedTime": "0001-01-01T00:00:00+00:00",
"deviceId": "ROBOT-104",
"etag": "NTI0MjQxMTky",
"generationId": "{{generationId}}",
"lastActivityTime": "0001-01-01T00:00:00+00:00",
"managedBy": null,
"moduleId": "DefenderIotMicroAgent"
},
{
"authentication": {
"symmetricKey": {
"primaryKey": null,
"secondaryKey": null
},
"type": "none",
"x509Thumbprint": {
"primaryThumbprint": null,
"secondaryThumbprint": null
}
},
"cloudToDeviceMessageCount": 0,
"connectionState": "Disconnected",
"connectionStateUpdatedTime": "0001-01-01T00:00:00+00:00",
"deviceId": "ROBOT-104",
"etag": "NjQ2NTkzMjI1",
"generationId": "{{generationId}}",
"lastActivityTime": "0001-01-01T00:00:00+00:00",
"managedBy": "iotEdge",
"moduleId": "diagnostics"
},
{
"authentication": {
"symmetricKey": {
"primaryKey": "{{primaryKey}}",
"secondaryKey": "{{secondaryKey}}"
},
"type": "sas",
"x509Thumbprint": {
"primaryThumbprint": null,
"secondaryThumbprint": null
}
},
"cloudToDeviceMessageCount": 0,
"connectionState": "Disconnected",
"connectionStateUpdatedTime": "0001-01-01T00:00:00+00:00",
"deviceId": "ROBOT-104",
"etag": "ODk4MjU1NjM4",
"generationId": "{{generationId}}",
"lastActivityTime": "0001-01-01T00:00:00+00:00",
"managedBy": null,
"moduleId": "spatialanalysis"
}
]