Sample of using PyTorch for inference in an Azure IoT Edge Module.
This uses a PyTorch Squeezenet model for image classification encapsulated in an Azure IoT Edge module for running on Edge Devices or in the Simulator.
Follow the Quickstart at https://github.com/Azure/iotedgedev. See the Wiki for more information and instructions.
Building the module with the simulator tool, iotedgedev
, will produce output like:
The next step (combined command to setup and start simulator) will produce output like:
The final step, monitoring the simulated module, will produce output like:
Issues and Pull Requests are welcome.
If you need a .env
file in the running docker container created above, it will help to have an editor like vim
. Install into the container with:
sudo apt-get update && sudo apt-get install vim
sudo vim .env
Then to add the system variables listed in the .env
just “source” it in Unix environments:
source .env
To check the logs of a particular container (e.g. the IoT Edge Module) run:
sudo docker logs <CONTAINER ID>