TensorFlow2.3.0 をサーバ上でビルド中にエラーが発生しました。
keras_python_api_gen でエラーが起きているところは分かるのですが、解決しかねておりますので、もし分かる方がいらっしゃいましたらご教授頂けますでしょうか。
エラー内容
ERROR: /home/test/tensorflow/tensorflow/python/tools/BUILD:143:1 Executing genrule //tensorflow/python/keras/api:keras_python_api_gen failed (Aborted): bash failed: error executing command
確認したこと
エラー内容で調べてみた結果、いくつか当エラーについての記事はいくつか見つかり、
Keras-Preprocessing の未インストールが原因などの記載でした。しかしながら私の環境ではすでにインストール済みでした。
https://github.com/tensorflow/tensorflow/issues/36903
環境
・CPU:QEMU Virtual CPU version (cpu64-rhel6) 3コア
・メモリ:4GB(swap 10GB)
・CentOS7.7
・Python 3.6.8
・Bazel 3.1.0
・gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
・GPU無し
・numpy 1.19.1
・Keras 2.4.3
・Keras-Applications 1.0.8
・Keras-Preprocessing 1.1.2
実施コマンド
BAZEL_LINKOPTS=-static-libstdc++ BAZEL_LINKLIBS=-l%:libstdc++.a bazel build --verbose_failures --config=monolithic --config=noaws --config=nohdfs --config=nonccl --config=v2 --local_ram_resources=4096 --local_cpu_resources=3 //tensorflow/tools/pip_package:build_pip_package
設定
$ cat .tf_configure.bazelrc build --action_env PYTHON_BIN_PATH="/usr/bin/python3" build --action_env PYTHON_LIB_PATH="/usr/local/lib/python3.6/site-packages" build --python_path="/usr/bin/python3" build --config=xla build:opt --copt=-march=native build:opt --copt=-Wno-sign-compare build:opt --host_copt=-march=native build:opt --define with_default_optimizations=true test --flaky_test_attempts=3 test --test_size_filters=small,medium test:v1 --test_tag_filters=-benchmark-test,-no_oss,-gpu,-oss_serial test:v1 --build_tag_filters=-benchmark-test,-no_oss,-gpu test:v2 --test_tag_filters=-benchmark-test,-no_oss,-gpu,-oss_serial,-v1only test:v2 --build_tag_filters=-benchmark-test,-no_oss,-gpu,-v1only build --action_env TF_CONFIGURE_IOS="0"
エラー詳細
Target //tensorflow/tools/pip_package:build_pip_package failed to build ERROR: /home/testtest/tensorflow/tensorflow/python/tools/BUILD:143:1 Executing genrule //tensorflow/python/keras/api:keras_python_api_gen failed (Aborted): bash failed: error executing command (cd /root/.cache/bazel/_bazel_root/517fded8430336971b07a7179cbf03cd/execroot/org_tensorflow && \ exec env - \ LD_LIBRARY_PATH=/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib:/opt/rh/devtoolset-7/root/usr/lib64/dyninst:/opt/rh/devtoolset-7/root/usr/lib/dyninst:/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib \ PATH=/opt/rh/devtoolset-7/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin \ PYTHON_BIN_PATH=/usr/bin/python3 \ PYTHON_LIB_PATH=/usr/local/lib/python3.6/site-packages \ TF2_BEHAVIOR=1 \ TF_CONFIGURE_IOS=0 \ TF_ENABLE_XLA=1 \
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/08/14 13:54
2020/08/14 14:03
2020/08/14 14:10
2020/08/15 08:12
2020/08/15 16:51
2020/08/16 01:54
2020/08/17 01:53