forked from tensorflow/tflite-micro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.micro
59 lines (48 loc) · 2.09 KB
/
Dockerfile.micro
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# This docker container can be used to run all the TFLM CI checks.
#
# It is only used as part of the GitHub workflows to test for code-style. But
# the container is available and ready for use to run all the checks locally,
# in case that is useful for debugging. See all the versions at
# https://github.com/users/TFLM-bot/packages/container/tflm-ci/versions
#
# docker pull ghcr.io/tflm-bot/tflm-ci:<version>
#
# Build you own container with:
# docker build -f ci/Dockerfile.micro -t tflm-ci .
#
# Use a prebuilt Python image instead of base Ubuntu to speed up the build process,
# since it has all the build dependencies we need for Micro and downloads much faster
# than the install process.
FROM python:3.9.0-buster
RUN echo deb http://apt.llvm.org/buster/ llvm-toolchain-buster-12 main > /etc/apt/sources.list.d/llvm.list
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
RUN apt-get update
RUN apt-get install -y zip xxd sudo
RUN apt-get install -y clang-12 clang-format-12
# Set clang-12 and clang-format-12 as the default to ensure that the pigweed
# formatting scripts use the desired version.
RUN ln -s /usr/bin/clang-12 /usr/bin/clang
RUN ln -s /usr/bin/clang++-12 /usr/bin/clang++
RUN ln -s /usr/bin/clang-format-12 /usr/bin/clang-format
# Install yapf to check for Python formatting as part of the TFLM continuous
# integration.
RUN pip install yapf==0.32.0
# Pillow was added first for the C array generation as a result of the following
# PRs:
# https://github.com/tensorflow/tflite-micro/pull/337
# https://github.com/tensorflow/tflite-micro/pull/410
RUN pip install Pillow
RUN pip install Wave
# necessary bits for create_size_log scripts
RUN pip install pandas
RUN pip install matplotlib
RUN pip install six
# The following is necessary to build the Python interpreter
# `PYTHON_BIN_PATH` is used by the pybind_library() bazel rule
RUN export PYTHON_BIN_PATH=$(which python)
RUN apt install -y python-numpy
# Install Renode test dependencies
RUN pip install pyyaml requests psutil robotframework==4.0.1
COPY ci/*.sh /install/
RUN /install/install_bazel.sh
RUN /install/install_buildifier.sh