Last active
January 31, 2020 17:37
-
-
Save Namburger/9495ee10f57c80f4eb4f07dd6ffcb98a to your computer and use it in GitHub Desktop.
minimal Dockerfile for running some edgetpu demos
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
# 1) create this dockerfile | |
# 2) build: docker build -t "coral-edgetpu" . | |
# 3) run: docker run -it --privileged -v /dev/bus/usb:/dev/bus/usb coral-edgetpu /bin/bash | |
# 4) download install requriements: cd ~/tflite/python/examples/classification/ && bash install_requirements.sh | |
# 5) run example: python3 classify_image.py \ | |
# > --model models/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite \ | |
# > --labels models/inat_bird_labels.txt \ | |
# > --input images/parrot.jpg | |
FROM tensorflow/tensorflow:1.15.0-py3 | |
WORKDIR /home | |
ENV HOME /home | |
VOLUME /data | |
EXPOSE 8888 | |
RUN cd ~ | |
RUN apt-get update | |
RUN apt-get install -y git nano python-pip python-dev pkg-config wget usbutils | |
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-get install -y libedgetpu1-std | |
RUN wget https://dl.google.com/coral/python/tflite_runtime-2.1.0-cp36-cp36m-linux_x86_64.whl | |
RUN pip3 install tflite_runtime-2.1.0-cp36-cp36m-linux_x86_64.whl | |
RUN mkdir coral && cd coral | |
RUN git clone https://github.com/google-coral/tflite.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment