Hi !
Creating Docker images is a fun process. When I created the CustomVision.ai custom image to be executed in my Raspberry Pi, I faced a couple of errors, so now it’s time to save / share some lessons learned.
One of the most frustrating steps was after my 15 min wait time to build an image to find that the image was successfully built, however it dies after I run the image with a command like this one
sudo docker run -p 127.0.0.1:8080:80 -d <IMAGE ID>
There are a couple of options to understand what’s happen here. I decided to launch and trace the live events from Docker with the command
sudo docker events&
This windows is a full buffer of Docker events, after a while I detected that after I tried to start my docker image I got 2 messages similar to this one
2019-02-12T07:34:46.195722938-05:00 container start cdcdcc410518db46e09967412bd583c33cff6f4e8eee0f10e8baeec860f9c9a2 (image=295, io.balena.architecture=armv7hf, io.balena.device-type=raspberry-pi2, io.balena.qemu.version=3.0.0+resin-arm, name=musing_zhukovsky)
2019-02-12T07:34:46.195722938-05:00 container die cdcdcc410518db46e09967412bd583c33cff6f4e8eee0f10e8baeec860f9c9a2 (image=295, io.balena.architecture=armv7hf, io.balena.device-type=raspberry-pi2, io.balena.qemu.version=3.0.0+resin-arm, name=musing_zhukovsky)
As you probably detected (much faster than me!) the events were container start and container die. But the docker events does not display much more information with details of the event.
What we can use is the <LOG ID> included in the event line. And with the following command we can get more details of the event.
sudo docker logs cdcdcc410518db46e09967412bd583c33cff6f4e8eee0f10e8baeec860f9c9a2
This is much better! Now I know that we can’t import a Python module named PIL on the file [app.py], in the line 10. When I open the file, it all makes sense.
So now it’s time to check the dependencies and tools required to use TensorFlow in a Raspberry Pi. I’ll write more about this tomorrow 😀
Happy coding!
Greetings @ Toronto
El Bruno
References
- Custom Vision
- Docker Desktop
- Raspberry Pi
- Custom Vision + Azure IoT Edge on a Raspberry Pi 3
- Balena Docker Files for Raspberry Pi 3
My Posts
- Object recognition with Custom Vision and ONNX in Windows applications using WinML
- Object recognition with Custom Vision and ONNX in Windows applications using WinML
- Object recognition with Custom Vision and ONNX in Windows applications using Windows ML, drawing frames
- Object recognition with Custom Vision and ONNX in Windows applications using Windows ML, calculate FPS
- Can’t install Docker on Windows 10 Home, need Pro or Enterprise
- Running a Custom Vision project in a local Docker Container
- Analyzing images in a Console App using a Custom Vision project in a Docker Container
- Analyzing images using PostMan from a Custom Vision project hosted in a Docker Container
- Building the CustomVision.ai project in Docker in a RaspberryPi
Windows 10 and YOLOV2 for Object Detection Series
- Introduction to YoloV2 for object detection
- Create a basic Windows10 App and use YoloV2 in the camera for object detection
- Transform YoloV2 output analysis to C# classes and display them in frames
- Resize YoloV2 output to support multiple formats and process and display frames per second
- How to convert Tiny-YoloV3 model in CoreML format to ONNX and use it in a Windows 10 App
- Updated demo using Tiny YOLO V2 1.2, Windows 10 and YOLOV2 for Object Detection Series
- Alternatives to Yolo for object detection in ONNX format
13 comments