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

Modules sensehat-display and image-classifier-service fail immediately #65

Closed rgres closed 4 years ago

rgres commented 4 years ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Set up raspberry pi like in the discriptions (using Raspbian buster desktop), build and push IoT edge solution (VS code on Windows 10), deploy to raspberry pi, see modules "sensehat-display" and "image-classifier-service" fail (terminal "sudo iotedge list"), see logs of the two modules (terminal "sudo iotedge logs "

Any log messages given by the failure

From Module image classifier service:

Traceback (most recent call last): File "app.py", line 10, in from PIL import Image File "/usr/local/lib/python3.7/site-packages/PIL/Image.py", line 93, in from . import _imaging as core ImportError: libxcb.so.1: cannot open shared object file: No such file or directory

From Module sensehat-display:

Traceback (most recent call last): File "./main.py", line 14, in import DisplayManager File "/DisplayManager.py", line 1, in import sense_hat File "/usr/local/lib/python3.5/dist-packages/sense_hat/init.py", line 2, in from .sense_hat import SenseHat, SenseHat as AstroPi File "/usr/local/lib/python3.5/dist-packages/sense_hat/sense_hat.py", line 14, in from PIL import Image # pillow File "/usr/local/lib/python3.5/dist-packages/PIL/Image.py", line 93, in from . import _imaging as core ImportError: libxcb.so.1: cannot open shared object file: No such file or directory

Expected/desired behavior

no log errors :D

OS and Version?

Windows 10, Linux (raspbian buster)

Versions

Mention any other details that might be useful

Tried this multiple times with fresh installs of the pi, on pi3 and pi4


Thanks! We'll be in touch soon.

netsnake182 commented 4 years ago

Just found a fix for this. You need to add libgl1-mesa-glx on line 5 for ..\modules\ImageClassifierService\arm32v7.Dockerfile and add RUN apt update && apt install -y libgl1-mesa-glx on line 9 for ..\modules\SenseHatDisplay\arm32v7.Dockerfile

image

build your images again, push to the device and happy days :-)

rgres commented 4 years ago

That worked well, thank you

emmanuel-bv commented 4 years ago

Merged PR 68 to master to fix this issue