bazel

Is there a migration path from Maven to Bazel?

与世无争的帅哥 提交于 2019-12-22 02:32:08
问题 Now that Bazel (http://bazel.io/) has been opensourced, is there an incremental process by which I can gradually migrate (a large repository) from Maven to Bazel? 回答1: In the two years since Ulf responded, there's been a few efforts to assist with maven to bazel migration. In particular, the Bazel team is creating a tool to assist with this: https://github.com/bazelbuild/migration-tooling The tool generates expansive WORKSPACE files from a set of pom files or maven coordinates. In the ideal

Running a Tensorflow model on Android

て烟熏妆下的殇ゞ 提交于 2019-12-20 09:13:35
问题 I'm trying to figure out the workflow for training and deploying a Tensorflow model on Android. I'm aware of the other questions similar to this one on StackOverflow, but none of them seem to address the problems I've run into. After studying the Android example from the Tensorflow repository, this is what I think the workflow should be: Build and train Tensorflow model in Python. Create a new graph, and transfer all relevant nodes (i.e. not the nodes responsible for training) to this new

Xcode version must be specified to use an Apple CROSSTOOL

[亡魂溺海] 提交于 2019-12-20 08:36:40
问题 I try to build tensorflow-serving using bazel but I've encountered some errors during the building ERROR:/private/var/tmp/_bazel_Kakadu/3f0c35881c95d2c43f04614911c03a57/external/local_config_cc/BUILD:49:5: in apple_cc_toolchain rule @local_config_cc//:cc-compiler-darwin_x86_64: Xcode version must be specified to use an Apple CROSSTOOL. ERROR: Analysis of target '//tensorflow_serving/sources/storage_path:file_system_storage_path_source_proto' failed; build aborted. I've already tried to use

bazel “undeclared inclusion(s)” errors after updating gcc

柔情痞子 提交于 2019-12-20 04:35:27
问题 After updating from gcc-7.1 to gcc-7.2 I'm getting a lot of errors about undeclared inclusions of standard library headers. For example $ bazel build //test:my_test ERROR: /home/haining/my_project/BUILD:39:1: undeclared inclusion(s) in rule '//test:my_test': this rule is missing dependency declarations for the following files included by 'test/test_range.cpp': '/home/haining/gcc-7.2/include/c++/7.2.0/cstddef' '/home/haining/gcc-7.2/include/c++/7.2.0/x86_64-pc-linux-gnu/bits/c++config.h' '

installing TensorFlow on the IBM power8

天涯浪子 提交于 2019-12-19 10:32:19
问题 I have access to a large IBM Power8 machine, and would like to install TensorFlow on it. Naturally, I tried the quick pip install, but it failed: sudo pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.6.0-cp27-none-linux_x86_64.whl tensorflow-0.6.0-cp27-none-linux_x86_64.whl is not a supported wheel on this platform. Storing debug log for failure in /home/pv/.pip/pip.log Unfortunately, pip.log cotains little useful info. /usr/bin/pip run on Sat Feb 6 17:29:34 2016

How to add external header files during bazel/tensorflow build

♀尐吖头ヾ 提交于 2019-12-18 03:39:24
问题 I am trying to add external header file (like OpenCL header file) for some experimentation for tensorflow. I tried to add this into BUILD file under tensorflow/core/BUILD file: # This includes implementations of all kernels built into TensorFlow. cc_library( name = "all_kernels", visibility = ["//visibility:public"], copts = tf_copts() + ["-Ithird_party/include"], <==== this is the line I added I have also created a softlink in this directory to the location of these header files from OpenCL

Cannot find dynamic library when running a Python script from Bazel

谁说我不能喝 提交于 2019-12-14 03:21:29
问题 I am trying to setup CUDA enabled Python & TensorFlow environment on OSx 10.11.6 Everything went quite smoothly. First I installed following: CUDA - 7.5 cuDNN - 5.1 I ensured that the LD_LIBRARY_PATH and CUDA_HOME are set properly by adding following into my ~/.bash_profile file: export CUDA_HOME=/usr/local/cuda export DYLD_LIBRARY_PATH="$CUDA_HOME/lib:$DYLD_LIBRARY_PATH" export LD_LIBRARY_PATH="$CUDA_HOME/lib:$LD_LIBRARY_PATH" export PATH="$CUDA_HOME/bin:$PATH" Then I used Brew to install

$location expansion in Bazel

ぃ、小莉子 提交于 2019-12-13 16:06:00
问题 I want to add $(location) expansion to rules_scala for jvm_flags attribute where I set the dependency in the data attribute but that fails with: label '//src/java/com/google/devtools/build/lib:worker' in $(location) expression is not a declared prerequisite of this rule. I define a dependency in my target on that label in the data attribute like this: scala_specs2_junit_test( ... data = ["//src/java/com/google/devtools/build/lib:worker"], jvm_flags = ["-XX:HeapDumpPath=/some/custom/path", "

Bazel: using macros to generate build rules from lists

偶尔善良 提交于 2019-12-13 04:57:20
问题 I'm new to Bazel and got a question regarding Bazel macros. I'm looking for the best way to structure our build. Is it possible to iterate over a list containing the specifics to the build rules? For example I have a list containing srcs,deps,hdrs,name etc. This list is combined into one larger list containing all modules i want to build creating one component. If possible can someone give a short example how this would look in code? Thanks for your time 回答1: ok i got it: Content of Build

Use of [bazel] restricted_to attribute

醉酒当歌 提交于 2019-12-12 22:57:00
问题 I'm trying to use the bazel restricted_to attribute for a test. I want the test to only run on a specific cpu = build. To make this somewhat more complicated, the cpu type is defined in our /tools/cpp/CROSSTOOL file (cpu=armhf-debian). I've had no luck with guessing the syntax of the restricted_to parameter (my first guess was //cpu:armhf-debian , which just looked for a cpu package) Any Suggestions? 回答1: There's not a lot of documentation on restricted_to, and the other rules it works with,