Open5

Debian bullseye aarch64 emulation by x86 host (tensorflow v2.5.0 build)

PINTOPINTO
$ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
$ docker run -it --rm \
    -v `pwd`:/workspace \
    arm64v8/debian:bullseye
PINTOPINTO
# cat /etc/issue
Debian GNU/Linux 11 \n \l

# apt update && apt upgrade -y \
&& apt install -y python3-dev python3-pip \
&& pip3 install pip --upgrade \
&& apt install -y libhdf5-dev libc-ares-dev libeigen3-dev gcc \
libatlas3-base libatlas-base-dev libopenblas-dev libopenblas-base \
liblapack-dev libatlas-base-dev openmpi-bin libopenmpi-dev \
python3-dev libgfortran5 gfortran libblas-dev python-dev \
wget cmake make zip unzip curl git nano vim build-essential

# pip3 install cython numpy==1.20.3 \
&& pip3 install keras_applications==1.0.8 --no-deps \
&& pip3 install keras_preprocessing==1.1.0 --no-deps \
&& pip3 install h5py==3.1.0 \
&& pip3 install pybind11 gdown \
&& pip3 install -U --user six wheel mock

# wget https://github.com/bazelbuild/bazel/releases/download/3.7.2/bazel-3.7.2-linux-arm64 \
&& mv bazel-3.7.2-linux-arm64 bazel \
&& chmod 777 bazel \
&& mv bazel /usr/local/bin

# bazel version
Extracting Bazel installation...
Build label: 3.7.2
Build target: bazel-out/aarch64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu Dec 17 17:01:12 2020 (1608224472)
Build timestamp: 1608224472
Build timestamp as int: 1608224472

# ldd --version
ldd (Debian GLIBC 2.31-11) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
PINTOPINTO
# git clone -b v2.5.0 https://github.com/tensorflow/tensorflow.git \
&& cd tensorflow

# cd tensorflow/lite/kernels \
&& gdown --id 1fuB2m7B_-3u7-kxuNcALUp9wkrHsfCQB \
&& tar -zxvf kernels.tar.gz && rm kernels.tar.gz -f \
&& cd ../../.. \
&& bazel clean --expunge

# ./configure

# bazel build \
--config=monolithic \
--config=noaws \
--config=nohdfs \
--config=nonccl \
--config=v2 \
--define=tflite_pip_with_flex=true \
--define=tflite_with_xnnpack=true \
--ui_actions_shown=64 \
//tensorflow/tools/pip_package:build_pip_package