Skip to content

Instantly share code, notes, and snippets.

@Namburger
Last active January 31, 2020 17:37
Show Gist options
  • Save Namburger/9495ee10f57c80f4eb4f07dd6ffcb98a to your computer and use it in GitHub Desktop.
Save Namburger/9495ee10f57c80f4eb4f07dd6ffcb98a to your computer and use it in GitHub Desktop.
minimal Dockerfile for running some edgetpu demos
# 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