nischi / MMM-Face-Reco-DNN

Face recognition with opencv and deep neural network
MIT License
91 stars 46 forks source link

Running magicmirror in client mode in k8s #51

Closed DrSoops closed 4 years ago

DrSoops commented 4 years ago

I'm running my mm setup using server/client mode where the server is running in a kubernetes container.

Has anyone tried using this setup? I cannot figure out why my camera is not being used properly. I am loading the video device into the pod like usual and inside the pod I am able to run commands like raspistill -o test.jpg and am able to get an accurate image from the camera. But when I try to run this module it hangs on starting the VideoStream. I've tried raising Exceptions right after the VideoStream.start line and it never gets hit just hangs in the .start command.

I am assuming the module is using the camera attached to the server and not trying to access a camera that could potentially be on the browser (client) side since the python scripts are executed from the node_helper and not the main MMM-Face-Reco-DNN.js file.

k8s snippet

      volumes:
      - name: dev-video0
        hostPath:
          path: /dev/video0
...
        volumeMounts:
        - mountPath: /dev/video0
          name: dev-video0
nischi commented 4 years ago

I'm sorry, never tried this.

nischi commented 4 years ago

Maybe a duplicate for #40

DrSoops commented 4 years ago

Ahh I found out what my issue was, it was once again an issue with the usePiCamera config and version 0.5.2 of imutils. Upgrading to 0.5.3 made things work again.

nischi commented 4 years ago

Thanks to let us know.👍