Azure / iotedge

The IoT Edge OSS project
MIT License
1.46k stars 459 forks source link

Python / CV module on IoT Edge #3403

Closed vermaaditya closed 4 years ago

vermaaditya commented 4 years ago

Hi Team,

We are facing challenges as a part of the development process for deploying Computer Vision models in the form of Python custom modules on Azure IoT Edge. We are using Azure VM with Windows 10 Pro OS which supports IoT Edge runtime. As a part of the process we have initialized IoT edge and deployed SimulatedSensor module from market place.

As the CV Models are developed in python, and we understand that Python modules are not supported on Windows Machine. We would like to know how can we achieve the deployment of custom CV modules in a Windows 10 OS. image

After this we are trying to switch the container OS to Linux. We are getting the following error, kindly help us in resolving this issue as Linux Containers on Windows is supported - image

Kindly let me know if that will function as per our requirement ? Though for dev and testing purpose. image

Further to that, we are also trying to resolving the above scenario using WSL mentioned in the link - https://techcommunity.microsoft.com/t5/internet-of-things/linux-modules-with-azure-iot-edge-on-windows-10-iot-enterprise/ba-p/1407066.

To enable WSL there is a required for Windows 10 Version to be on build # 19041, and for Azure IoT Edge it is - build 17763. Also confirm if we update the Windows 10 version to support WSL how the Azure IoT Edge will function?

There are a lot of questions, will appreciate response on all of them.

vermaaditya commented 4 years ago

@ramkandimalla94 - FYI

veyalla commented 4 years ago

Hi @vermaaditya, are you following these steps: https://docs.microsoft.com/en-us/azure/iot-edge/how-to-install-iot-edge-windows-with-linux#prepare-the-container-engine?

Which version of Docker Desktop is installed?

ramkandimalla94 commented 4 years ago

HI @veyalla me and @vermaaditya are from the same team.

I am using 2.1.0.5(40693) version and yeah I followed the same instructions which you mentioned above

damonbarry commented 4 years ago

@vermaaditya @ramkandimalla94 Regarding the 1st issue (error while running the install script): You report that you've installed docker, but the install script apparently can't find it. What is the output of the following PowerShell command?

Get-Command docker

Regarding the 2nd issue (WSL supported version), IoT Edge requires Windows build 17763 (LTS) for Windows containers on Windows. If you're doing Linux containers, you can use a newer Windows version.

ramkandimalla94 commented 4 years ago

@damonbarry this is the output of Get-Command docker image

veyalla commented 4 years ago

Could you also share the output of docker context ls?

ramkandimalla94 commented 4 years ago

output of docker context ls image

damonbarry commented 4 years ago

As shown, the install script failed while trying to execute the command docker version --format "{{.Server.Os}}". Are you able to run this command directly from the command line, and does it return linux?

ramkandimalla94 commented 4 years ago

image

vermaaditya commented 4 years ago

@damonbarry @veyalla - if possible can we have a troubleshooting call over Teams?

veyalla commented 4 years ago

https://github.com/Azure/iotedge/issues/3403#issuecomment-673888714 indicates docker is not working correctly on the host. I suggest updating Docker Desktop or setting it up on a new VM (Windows version does not matter) and confirming basic 'docker run' functionality is working before installing IoT Edge.

vermaaditya commented 4 years ago

@veyalla - please confirm on the below 2 questions -

This will help us in defining the strategy. Please suggest.

emmanuel-bv commented 4 years ago

@veyalla , any updates on the above 2 questions? Thanks!

veyalla commented 4 years ago

This was communicated offline, including response here for closure.

Is this the only way to Run Python Modules on Windows Devices?

Yes.

Is it recommended to deploy Linux Containers on Windows machine in Production environment? I see as per the documentation its not suggested and is crossed as well with the notes but would appreciate if you can reconfirm.

Not currently. The guidance going forward is to leverage the first-party solution we're working towards which will preview later this year. More details