Open karmalk opened 3 years ago
I tried it. According to your method, you need to compile an arm64v8 version of bazel first, and then proceed to the following process, but I encountered a problem that caused the bazel arm64v8 version to fail to compile successfully.
E: Unable to locate package openjdk-11-jdk-headless ./scripts/install_requirements.sh: line 9: update-java-alternatives: command not found Makefile:19: recipe for target 'requirements' failed make: *** [requirements] Error 127
Are you by any chance running this on Raspberry Pi OS/Debian 9? There's an issue about this with a solution:
I tried to install bazel, and tensorflow-addons was also installed according to the source code, but I found a problem with tensorflow-text during the installation of rasa. Can you install it successfully? I used bazel to build the tensorflow-text source code, but the following error occurred, and I don’t know how to solve it
root@b39582782284:/home/python_pkg/text# ./oss_scripts/run_build.sh
++ uname -s
+ osname=Linux
+ [[ Linux == \D\a\r\w\i\n ]]
+ ./oss_scripts/configure.sh
Using installed tensorflow.
+ bazel build oss_scripts/pip_package:build_pip_package
Starting local Bazel server and connecting to it...
INFO: Repository com_google_protobuf instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule http_archive defined at:
/root/.cache/bazel/_bazel_root/a937f9401c610c821d7d88d13cca8373/external/bazel_tools/tools/build_defs/repo/http.bzl:336:16: in <toplevel>
ERROR: An error occurred during the fetch of repository 'com_google_protobuf':
java.io.IOException: thread interrupted
INFO: Repository bazel_skylib instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule http_archive defined at:
/root/.cache/bazel/_bazel_root/a937f9401c610c821d7d88d13cca8373/external/bazel_tools/tools/build_defs/repo/http.bzl:336:16: in <toplevel>
ERROR: Analysis of target '//oss_scripts/pip_package:build_pip_package' failed; build aborted: no such package '@com_google_protobuf//': java.io.IOException: thread interrupted
INFO: Elapsed time: 99.862s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (18 packages loaded, 88 targets configured)
currently loading: @org_tensorflow//tensorflow ... (2 packages)
Fetching @local_config_cc; fetching 60s
I haven't seen this error for ARMv7. If you search for "no such package '@com_google_protobuf//" you can find a lot of people with this problem. Using another (older) version of Bazel seems to do the trick sometimes.
I don’t know much about bazel, so I don’t plan to try to use bazel to compile the package. I plan to remove some of the dependent packages in rasa that cannot be installed on arm64 and will not affect the operation of rasa.
I haven't tested this yet, and it will need some changes. You should start with finding pre-built wheels for armv8 for TensorFlow and TensorFlow Addons, and you have to add their URLs like I have done for armv7 versions in this patch:
https://github.com/koenvervloesem/rasa-docker-arm/blob/master/patches/rasa-1.10.16-arm.patch
As far as I know, piwheels.org doesn't have 64-bit wheels yet, so I don't know whether building the other dependencies will work easily. You'll probably have to investigate some build issues.
Let me know if you can make this work. I'd like to add ARM64 support, but I haven't found the time yet.