Azure-Samples / Custom-vision-service-iot-edge-raspberry-pi

Sample showing how to deploy a AI model from the Custom Vision service to a Raspberry Pi 3 device using Azure IoT Edge
MIT License
186 stars 135 forks source link

camera-capture fails to automatically start #81

Open AnnamariaGalante opened 1 year ago

AnnamariaGalante commented 1 year ago

Then, given our manifest set on restartPolicy: Alway, the camera caputre module restarts but gives the same error. Here the manfifest: { "modulesContent": { "$edgeAgent": { "properties.desired": { "schemaVersion": "1.1", "runtime": { "type": "docker", "settings": { "minDockerVersion": "v1.25", "loggingOptions": "", "registryCredentials": { "demomanufacturing": { "address": "", "password": "", "username": "" }, "docker": { "address": "", "password": "", "username": "" } } } }, "systemModules": { "edgeAgent": { "env": { "SendRuntimeQualityTelemetry": { "value": false }, "MaxRestartCount": { "value": 5 }, "IntensiveCareTimeInMinutes": { "value": 5 }, "ModuleUpdateMode": { "value": "WaitForAllPulls" }, "CoolOffTimeUnitInSeconds": { "value": 60 } }, "settings": { "image": "mcr.microsoft.com/azureiotedge-agent:1.2", "createOptions": "{}" }, "type": "docker" }, "edgeHub": { "restartPolicy": "always", "settings": { "image": "mcr.microsoft.com/azureiotedge-hub:1.2", "createOptions": "{\"HostConfig\":{\"PortBindings\":{\"5671/tcp\":[{\"HostPort\":\"5671\"}],\"8883/tcp\":[{\"HostPort\":\"8883\"}],\"443/tcp\":[{\"HostPort\":\"443\"}]}}}" }, "status": "running", "type": "docker" } }, "modules": { "camera-capture": { "env": { "IMAGE_PROCESSING_ENDPOINT": { "value": "" }, "RESIZE_WIDTH": { "value": "256" }, "RESIZE_HEIGHT": { "value": "256" }, "IMAGE_PROCESSING_PARAMS": { "value": "\"{'returnLabels': 'true'}\"" }, "VERBOSE": { "value": "True" } }, "restartPolicy": "always", "settings": { "image": "", "createOptions": " {\"HostConfig\":{\"PortBindings\":{\"5012/tcp\":[{\"HostPort\":\"5012\"}]},\"Binds\":[\"/dev/video0:/dev/video0\"],\"Devices\":[{\"PathOnHost\":\"/dev/video0\",\"PathInContainer\":\"/dev/video0\",\"CgroupPermissions\":\"mrw\"}]}} " }, "startupOrder": 4294967295, "status": "running", "type": "docker", "version": "1.0" },

                "image-classifier-service": {
                    "restartPolicy": "always",
                    "settings": {
                        "image": ""
                    },
                    "startupOrder": 2,
                    "status": "running",
                    "type": "docker"
                }
            }
        }
    },
    "$edgeHub": {
        "properties.desired": {
            "schemaVersion": "1.2",
            "routes": {
                "CameraCaptureToIoTHub": {
                    "route": "FROM /messages/modules/camera-capture/outputs/output1 INTO $upstream"
                },
                "CameraCaptureGAToIoTHub": {
                    "route": "FROM /messages/modules/CameraCaptureGA/outputs/* INTO $upstream"
                }
            },
            "storeAndForwardConfiguration": {
                "timeToLiveSecs": 7200
            }
        }
    },
    "camera-capture": {
        "properties.desired": {}
    },
    "image-classifier-service": {
        "properties.desired": {}
    }
}

}

Expected/desired behavior camera capture module automatically running, not only after manual restart

OS and Version?

Raspdian running on a Pi4