-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
42 lines (27 loc) · 1.02 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Built using https://coral.withgoogle.com/tutorials/accelerator/
FROM balenalib/raspberrypi3-debian
# Install some utilities we will need
RUN apt-get update && apt-get install build-essential wget feh
# Set our working directory
WORKDIR /usr/src/app
# Need udev for some dynamic dev nodes
ENV UDEV=1
# Fetch latest edge TPU libs
RUN wget https://dl.google.com/coral/edgetpu_api/edgetpu_api_latest.tar.gz -O edgetpu_api.tar.gz --trust-server-names && \
tar xzf edgetpu_api.tar.gz && rm edgetpu_api.tar.gz
WORKDIR /usr/src/app/edgetpu_api
# Override the MODEL variable so we can build in a container.
ENV MODEL="Raspberry Pi 3 Model B Rev"
RUN sed -i "s|MODEL=|#MODEL=|g" install.sh
# Pass N to the prompt in the install script if we want to overclock the tpu
RUN yes n | ./install.sh
# Set our working directory
WORKDIR /usr/src/app
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY models/ models/
COPY src/ src/
COPY run.sh run.sh
# Flip the camera vertically
ENV VFLIP=True
CMD ["bash","run.sh"]