无法从源服务构建tensorflow

时间:2018-12-18 11:02:11

标签: tensorflow tensorflow-serving

    Step 40/44 : RUN ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 &&     LD_LIBRARY_PATH=/usr/local/cuda/lib64/stubs:${LD_LIBRARY_PATH}     bazel build --color=yes --curses=yes --config=cuda --copt="-fPIC"    ${TF_SERVING_BAZEL_OPTIONS}     --verbose_failures     --output_filter=DONT_MATCH_ANYTHING     ${TF_SERVING_BUILD_OPTIONS}     tensorflow_serving/model_servers:tensorflow_model_server &&     cp bazel-bin/tensorflow_serving/model_servers/tensorflow_model_server     /usr/local/bin/ &&     rm /usr/local/cuda/lib64/stubs/libcuda.so.1
 ---> Running in 274dc2ca5f96
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
...........
ERROR: /root/.cache/bazel/_bazel_root/e53bbb0b0da4e26d24b415310219b953/external/local_config_cuda/crosstool/BUILD:29:1: @local_config_cuda//crosstool:cc-compiler-local: no such attribute 'toolchain_identifier' in 'cc_toolchain' rule
ERROR: /root/.cache/bazel/_bazel_root/e53bbb0b0da4e26d24b415310219b953/external/local_config_cuda/crosstool/BUILD:48:1: @local_config_cuda//crosstool:cc-compiler-darwin: no such attribute 'toolchain_identifier' in 'cc_toolchain' rule
ERROR: /root/.cache/bazel/_bazel_root/e53bbb0b0da4e26d24b415310219b953/external/local_config_cuda/crosstool/BUILD:63:1: @local_config_cuda//crosstool:cc-compiler-windows: no such attribute 'toolchain_identifier' in 'cc_toolchain' rule
ERROR: /root/.cache/bazel/_bazel_root/e53bbb0b0da4e26d24b415310219b953/external/local_config_cuda/crosstool/BUILD:83:1: Target '@local_config_cuda//crosstool:clang/bin/crosstool_wrapper_driver_is_not_gcc' contains an error and its package is in error and referenced by '@local_config_cuda//crosstool:crosstool_wrapper_driver_is_not_gcc'
ERROR: /root/.cache/bazel/_bazel_root/e53bbb0b0da4e26d24b415310219b953/external/local_config_cuda/crosstool/BUILD:29:1: Target '@local_config_cuda//crosstool:crosstool_wrapper_driver_is_not_gcc' contains an error and its package is in error and referenced by '@local_config_cuda//crosstool:cc-compiler-local'
ERROR: /root/.cache/bazel/_bazel_root/e53bbb0b0da4e26d24b415310219b953/external/local_config_cuda/crosstool/BUILD:29:1: Target '@local_config_cuda//crosstool:empty' contains an error and its package is in error and referenced by '@local_config_cuda//crosstool:cc-compiler-local'
ERROR: /root/.cache/bazel/_bazel_root/e53bbb0b0da4e26d24b415310219b953/external/local_config_cuda/crosstool/BUILD:29:1: Target '@local_config_cuda//crosstool:empty' contains an error and its package is in error and referenced by '@local_config_cuda//crosstool:cc-compiler-local'
ERROR: /root/.cache/bazel/_bazel_root/e53bbb0b0da4e26d24b415310219b953/external/local_config_cuda/crosstool/BUILD:29:1: Target '@local_config_cuda//crosstool:empty' contains an error and its package is in error and referenced by '@local_config_cuda//crosstool:cc-compiler-local'
ERROR: /root/.cache/bazel/_bazel_root/e53bbb0b0da4e26d24b415310219b953/external/local_config_cuda/crosstool/BUILD:29:1: Target '@local_config_cuda//crosstool:crosstool_wrapper_driver_is_not_gcc' contains an error and its package is in error and referenced by '@local_config_cuda//crosstool:cc-compiler-local'
ERROR: /root/.cache/bazel/_bazel_root/e53bbb0b0da4e26d24b415310219b953/external/local_config_cuda/crosstool/BUILD:29:1: Target '@local_config_cuda//crosstool:empty' contains an error and its package is in error and referenced by '@local_config_cuda//crosstool:cc-compiler-local'
ERROR: /root/.cache/bazel/_bazel_root/e53bbb0b0da4e26d24b415310219b953/external/local_config_cuda/crosstool/BUILD:29:1: Target '@local_config_cuda//crosstool:empty' contains an error and its package is in error and referenced by '@local_config_cuda//crosstool:cc-compiler-local'
ERROR: /root/.cache/bazel/_bazel_root/e53bbb0b0da4e26d24b415310219b953/external/local_config_cuda/crosstool/BUILD:29:1: Target '@local_config_cuda//crosstool:empty' contains an error and its package is in error and referenced by '@local_config_cuda//crosstool:cc-compiler-local'
ERROR: /tensorflow-serving/tensorflow_serving/model_servers/BUILD:364:1: every rule of type cc_binary implicitly depends upon the target '@local_config_cuda//crosstool:cc-compiler-local', but this target could not be found because of: Target '@local_config_cuda//crosstool:cc-compiler-local' contains an error and its package is in error
ERROR: Analysis of target '//tensorflow_serving/model_servers:tensorflow_model_server' failed; build aborted: Analysis failed
INFO: Elapsed time: 36.197s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (8 packages loaded)
    currently loading: @bazel_tools//tools/cpp ... (4 packages)
The command '/bin/sh -c ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 &&     LD_LIBRARY_PATH=/usr/local/cuda/lib64/stubs:${LD_LIBRARY_PATH}     bazel build --color=yes --curses=yes --config=cuda --copt="-fPIC"    ${TF_SERVING_BAZEL_OPTIONS}     --verbose_failures     --output_filter=DONT_MATCH_ANYTHING     ${TF_SERVING_BUILD_OPTIONS}     tensorflow_serving/model_servers:tensorflow_model_server &&     cp bazel-bin/tensorflow_serving/model_servers/tensorflow_model_server     /usr/local/bin/ &&     rm /usr/local/cuda/lib64/stubs/libcuda.so.1' returned a non-zero code: 1

1 个答案:

答案 0 :(得分:0)

问题是因为CPU(Intel Celeron)不够好,将CPU升级到Intel I5可以解决问题。