简体   繁体   中英

Building Tensorflow r1.12 with Cuda 10 on Ubuntu 18.04

I really have tried getting built. I have followed the instructions here and here and here . Clean system:

  • Ubuntu 18.04 server
  • Ubuntu Gnome
  • Cuda 10.0
  • cuDNN 7.4.1
  • NCCL 2.3.7
  • TensorRT 5.0.2.1
  • Tensorflow r1.12
  • Python 3.6
  • GCC 7.3.0 using the command line:

    bazel build --config=cuda --config=mkl //tensorflow/tools/pip_package:build_pip_package

This is the error:

WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
/devel/software/tensorflow/tools/bazel.rc
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=171
ERROR: Config value cuda is not defined in any .rc file

Anybody know which parts of bazel.rc the need to be imported?

Why is cuda not defined?

If I try:

bazel test -c opt -- //tensorflow/... -//tensorflow/compiler/... -//tensorflow/contrib/lite/...

It fails with this error:

ERROR: /devel/software/tensorflow/tensorflow/python/BUILD:3768:1: Linking of rule '//tensorflow/python:_pywrap_tensorflow_internal.so' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc -shared -o bazel-out/k8-opt/bin/tensorflow/python/_pywrap_tensorflow_internal.so -Wl,--version-script bazel-out/k8-opt/bin/tensorflow/python/pywrap_tensorflow_internal_versionscript.lds ... (remaining 65 argument(s) skipped)

Anyone had success? (Obviously at least 2 people have) Maybe someone could tell me what I am doing wrong? Or how to get this built?

Do as what is said in the warning and it will work.

"WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
/devel/software/tensorflow/tools/bazel.rc"

You should have a file .bazelrc at /devel/software/tensorflow/.bazelrc. At the top of this file add the following code snippet.

import /devel/software/tensorflow/tools/bazel.rc

Enjoy!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM