Skip to content

Instantly share code, notes, and snippets.

@akiatoji
Created December 30, 2019 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akiatoji/f68551e64154cc56d27056ea746f156c to your computer and use it in GitHub Desktop.
Save akiatoji/f68551e64154cc56d27056ea746f156c to your computer and use it in GitHub Desktop.
Google Edge TPU Retrain container Dockerfile
# The Dockerfile used in https://coral.ai/docs/edgetpu/retrain-classification/ is a bit old and does not work
# Below is the updated Dockerfile to retrain image classifier for use in Coral EdgeTPU
FROM tensorflow/tensorflow:1.11.0-devel-py3
# Install wget (to make life easier below) and editors (to allow people to edit
# the files inside the container)
RUN apt-get update && \
apt-get install -y wget vim emacs nano git && \
pip install -U contextlib2 tensorflow
# Get the tensorflow models research directory, and move it into tensorflow
# source folder to match recommendation of installation
RUN ln -s /tensorflow_src /tensorflow && \
git clone https://github.com/tensorflow/models.git && \
mv models /tensorflow/models
ARG work_dir=/tensorflow/models/research/slim
# Get classification transfer learning scripts.
ARG scripts_link="http://storage.googleapis.com/cloud-iot-edge-pretrained-models/docker/classify_scripts.tgz"
RUN cd ${work_dir} && \
wget -O classify_scripts.tgz ${scripts_link} && \
tar zxvf classify_scripts.tgz
WORKDIR ${work_dir}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment