Fix TensorFlow build environment for ARM64

This commit is contained in:
Michael Mayer
2020-04-28 12:27:19 +02:00
parent 4f05fde794
commit deaf33ff26
2 changed files with 23 additions and 5 deletions

View File

@@ -58,8 +58,6 @@ RUN mv bazel-0.24.1-aarch64 /usr/local/bin/bazel && chmod 755 /usr/local/bin/baz
# Configure TensorFlow # Configure TensorFlow
WORKDIR "/home/tensorflow/tensorflow-1.15.2" WORKDIR "/home/tensorflow/tensorflow-1.15.2"
COPY ../*.sh ./ COPY ./*.sh ./
COPY ./*.diff ./ COPY ./.tf_configure.bazelrc .tf_configure.bazelrc
COPY ./tf_configure.bazelrc .tf_configure.bazelrc
COPY ./Makefile Makefile COPY ./Makefile Makefile

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
if [[ -z $1 ]] || [[ -z $2 ]]; then
echo "Usage: $0 [platform] [tf-version]" 1>&2
exit 1
fi
echo "Creating 'libtensorflow-$1-$2.tar.gz'...";
rm -rf tmp
mkdir -p tmp/lib/
mkdir -p tmp/include/tensorflow/c/eager/
cp bazel-bin/tensorflow/libtensorflow.so.$2 tmp/lib/libtensorflow.so
cp bazel-bin/tensorflow/libtensorflow_framework.so.$2 tmp/lib/libtensorflow_framework.so
cp tensorflow/c/eager/c_api.h tmp/include/tensorflow/c/eager/
cp tensorflow/c/c_api.h tensorflow/c/c_api_experimental.h LICENSE tmp/include/tensorflow/c/
(cd tmp && tar -czf ../libtensorflow-$1-$2.tar.gz .)
du -h libtensorflow-$1-$2.tar.gz
echo "Done"