STT-tensorflow/tensorflow/tools/ci_build/Dockerfile.pi-python38
Terry Heo 98b4246afa Refactor Python PIP build scripts for ARM/ARM64
- Simplify build commands with only container name without providing environment variables.
- Add Python 3.8 support.
- Update build_raspberry_pi.sh to build generate aarch64 binary.

[Python 3.8 PIP package for ARM64]
The following command is used to build Python 3.8 PIP package for aarch64.
$ tensorflow/tools/ci_build/ci_build.sh PI-PYTHON38 \
    tensorflow/tools/ci_build/pi/build_raspberry_pi.sh AARCH64

[Test on Ubuntu 20.04 ARM64]
I've tested the PIP package on Ubuntu 20.04 64bit with RPI4.
There was an issue on installing h5py on Ubuntu 20.04. The following command
was needed to install h5py package.
$ HDF5_DIR=/usr/lib/aarch64-linux-gnu/hdf5/serial CC=h5cc pip3 install h5py

This PR handles #30716 issue.

PiperOrigin-RevId: 323111228
Change-Id: I408149305a082afe105215fc380f602961b2fdf0
2020-07-24 18:40:57 -07:00

29 lines
840 B
Docker

FROM ubuntu:16.04
LABEL maintainer="Terry Heo <terryheo@google.com>"
ENV CI_BUILD_PYTHON=python3.8
ENV CROSSTOOL_PYTHON_INCLUDE_PATH=/usr/include/python3.8
# Copy and run the install scripts.
COPY install/*.sh /install/
RUN /install/install_bootstrap_deb_packages.sh
RUN add-apt-repository -y ppa:openjdk-r/ppa && \
add-apt-repository -y ppa:george-edison55/cmake-3.x
RUN /install/install_deb_packages.sh
# The following line installs the Python 3.8 cross-compilation toolchain.
RUN /install/install_pi_python3x_toolchain.sh "3.8"
RUN /install/install_bazel.sh
RUN /install/install_proto3.sh
RUN /install/install_buildifier.sh
RUN /install/install_auditwheel.sh
RUN /install/install_golang.sh
# Set up the master bazelrc configuration file.
COPY install/.bazelrc /etc/bazel.bazelrc
# XLA is not needed for PI
ENV TF_ENABLE_XLA=0