Add aarch64 docker container to build tensorflow
This commit is contained in:
parent
faa3035456
commit
3b18f8e883
2 changed files with 25 additions and 4 deletions
|
@ -58,8 +58,8 @@ RUN mv bazel-0.24.1-aarch64 /usr/local/bin/bazel && chmod 755 /usr/local/bin/baz
|
|||
|
||||
# Configure TensorFlow
|
||||
WORKDIR "/home/tensorflow/tensorflow-1.14.0"
|
||||
COPY /docker/tensorflow/*.sh ./
|
||||
COPY /docker/tensorflow/*.diff ./
|
||||
COPY /docker/tensorflow/.tf_configure.bazelrc .tf_configure.bazelrc
|
||||
COPY /docker/tensorflow/Makefile Makefile
|
||||
COPY ./*.sh ./
|
||||
COPY ./*.diff ./
|
||||
COPY ./.tf_configure.bazelrc .tf_configure.bazelrc
|
||||
COPY ./Makefile.aarch64 Makefile
|
||||
RUN make patch
|
||||
|
|
21
docker/tensorflow/Makefile.aarch64
Normal file
21
docker/tensorflow/Makefile.aarch64
Normal file
|
@ -0,0 +1,21 @@
|
|||
TF_VERSION=1.14.0
|
||||
|
||||
all: libtensorflow static archive
|
||||
patch:
|
||||
git apply tensorflow-$(TF_VERSION).diff
|
||||
libtensorflow:
|
||||
bazel build --jobs 2 --config=opt //tensorflow:libtensorflow.so
|
||||
static:
|
||||
env JOB_COUNT=2 ARCH=armv8-a ./build_static.sh
|
||||
archive:
|
||||
rm -rf tmp
|
||||
mkdir -p tmp/lib/
|
||||
mkdir -p tmp/include/tensorflow/c/eager/
|
||||
cp bazel-bin/tensorflow/libtensorflow.so.$(TF_VERSION) tmp/lib/libtensorflow.so
|
||||
cp bazel-bin/tensorflow/libtensorflow_framework.so.$(TF_VERSION) 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-nvidia-jetson-nano-$(TF_VERSION).tar.gz .)
|
||||
#du -h libtensorflow-nvidia-jetson-nano-$(TF_VERSION).tar.gz
|
||||
guy@golem4:/tmp/photoprism/docker/tensorflow$
|
||||
|
Loading…
Reference in a new issue