简体   繁体   中英

Build Tensorflow with Bazel

I would like build tensorflow with Bazel to use the compiled libary in c++. I run the following commands in cmd.

C:\Users\Furkan\Desktop\tensorflow-1.14.0>bazel build --config=opt
WARNING: Usage: bazel build <options> <targets>.
Invoke `bazel help build` for full description of usage and options.
Your request is correct, but requested an empty set of targets. Nothing will be built.
INFO: Build option --define has changed, discarding analysis cache.
INFO: Analyzed 0 targets (0 packages loaded, 0 targets configured).
INFO: Found 0 targets...
INFO: Elapsed time: 0.124s, Critical Path: 0.01s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action

After that they create the folders in tensorflow, but the folders are empty.. What I do wrong??

bazel: 0.25.2 tensorflow: 1.14.0

I guess you're typing an incomplete command, you should type:

bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package

The

//tensorflow/tools/pip_package:build_pip_package

is the location of the BUILD file, if you're not including it bazel does not know what to build. Including that in your command should solve the issue.

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