podman build -f Containerfile --rm -t coral:v0.1 --no-cache
podman run -it --group-add keep-groups -v /dev:/dev --name coral localhost/coral:v0.1
mkdir /home/coral && cd /home/coral && git clone https://github.com/google-coral/pycoral.git
cd /home/coral/pycoral && bash examples/install_requirements.sh classify_image.py
python3 examples/classify_image.py \ --model test_data/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite \ --labels test_data/inat_bird_labels.txt \ --input test_data/parrot.jpg
Note this run command inherits the current user's permissions to all devices in the /dev directory on the host and provides access to all devices the container. This is fine for dev environments with my specific configuration for what I need. Review these assumptions. YMMV.
This repo was directly inspired by
on GitHub. I was having trouble installing the correct versions of the system libraries
needed to compile and install the Coral TPU software and pulled the above repo to
play around.
However, I made a few changes: