photoprism/docker/tensorflow/arm64/Makefile
Michael Mayer 0b9233f44b AI: Build libtensorflow with --copt=-O2 instead of --copt=-O3 #222 #4922
This should optimize for fast execution as much as possible without
significantly increasing the binary size.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-04-06 09:25:20 +02:00

11 lines
516 B
Makefile

all: libtensorflow
# Downloads the TensorFlow source code from GitHub and extracts it to a subdirectory:
download:
wget https://github.com/tensorflow/tensorflow/archive/v$(TF_VERSION).tar.gz
tar -xzf v$(TF_VERSION).tar.gz
cp Makefile *.sh tensorflow-$(TF_VERSION)
# Clang command line argument reference:
# https://clang.llvm.org/docs/ClangCommandLineReference.html#aarch64
libtensorflow:
bazel build -c opt //tensorflow:libtensorflow.so --copt=-O2 --copt=-march=armv8-a
./create_archive.sh arm64 $(TF_VERSION)