Last active
January 8, 2024 22:38
-
-
Save Namburger/fc1e697f9415a1cb98cd95c74facd4de to your computer and use it in GitHub Desktop.
An example to get Ubuntu/python3.8 working with unofficial edgetpu wheel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MAKE THIS DOCKERFILE | |
FROM ubuntu:20.04 | |
ENV TZ=US/Central | |
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | |
WORKDIR /home | |
ENV HOME /home | |
VOLUME /data | |
EXPOSE 8888 | |
RUN cd ~ | |
RUN apt-get update && apt-get install -y git unzip pkg-config wget usbutils curl apt-transport-https ca-certificates gnupg2 vim python3 python3-pip | |
RUN echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | tee /etc/apt/sources.list.d/coral-edgetpu.list | |
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
RUN apt-get update | |
RUN apt install -y libedgetpu1-std | |
RUN git clone https://github.com/google-coral/edgetpu.git | |
RUN wget https://github.com/google-coral/edgetpu/files/5052663/edgetpu-2.14.1-py3-none-any.zip && unzip edgetpu-2.14.1-py3-none-any.zip && pip3 install edgetpu-2.14.1-py3-none-any.whl | |
# BUILD | |
docker build -t "coral-ubuntu20" . | |
# RUN DOCKER IMAGE | |
docker run -it --privileged --device=/dev/bus/usb:/dev/bus/usb coral-ubuntu20 /bin/bash | |
# RUN AN EXAMPLE | |
python3 edgetpu/examples/object_detection.py --model edgetpu/test_data/ssd_mobilenet_v1_coco_quant_postprocess_edgetpu.tflite --input edgetpu/test_data/grace_hopper.bmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment