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

Update deployment.test-amd64.template.json #56

Open YanZhangADS opened 5 years ago

YanZhangADS commented 5 years ago

Purpose

Bug fix.

Does this introduce a breaking change?

[x] Yes
[ ] No

Pull Request Type

What kind of change does this Pull Request introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install

What to Check

Verify that the following are valid

Other Information

When I used original deployment manifest on Ubuntu Linux 16.04, it produces following error message https://github.com/Azure-Samples/Custom-vision-service-iot-edge-raspberry-pi/blob/master/deployment.test-amd64.template.json

{'Message': "ErrorCode:ArgumentInvalid;Provided json is not a valid 'tags' or 'properties' object: arrays are not supported.", 'ExceptionMessage': 'Tracking ID:0173d70dfbab44b6b646b5008f2b7a24-G:38-TimeStamp:08/01/2019 12:45:51'}

I fix the issue by replacing original "createOptions" section with "createOptions": "{\"HostConfig\": {\"PortBindings\": {\"5012/tcp\": [ { \"HostPort\":\"5012\"}]}}}" -- add back slashes at certain places.

emmanuel-bv commented 5 years ago

@YanZhangADS thanks for your contribution! Are you sure that the error is due to these quotes? They shoudl not be required + the current json is valid, so I dont understand why adding quotes will fix this issue. Could it be coming from something else? Thanks!