bazel

Bazel building C++ sample with ccache fails

烈酒焚心 提交于 2019-12-08 03:18:36
问题 I've been following the instructions for OSX here. I've installed bazel, cloned the sample and tried to build it with bazel build //main:hello-world . But here where it got wrong. INFO: Analysed target //main:hello-world (0 packages loaded). INFO: Found 1 target... ERROR: /Users/myuser/work/temp/bazel-sample/examples/cpp-tutorial/stage1/main/BUILD:1:1: Linking of rule '//main:hello-world' failed (Exit 1) ccache: error: Failed to create temporary file for /Users/myuser/.ccache/6/stats.tmp:

Building TensorFlow from source on Ubuntu 16.04 w/ GPU: `GLIBCXX_3.4.20' not found

心不动则不痛 提交于 2019-12-07 16:19:36
问题 I'm on Ubuntu 16.04 and am trying to build TensorFlow with GPU support from source according to this. Everything works fine until the "Build TensorFlow" step, in which I execute: bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package The compilation hits an error with output: ERROR: /home/thomas/tensorflow/tensorflow/core/BUILD:978:28: Executing genrule //tensorflow/core:proto_text_srcs_all failed: bash failed: error executing command /bin/bash -c ... (remaining 1

How do I tell Bazel where Python.h lives?

感情迁移 提交于 2019-12-07 14:13:32
问题 I'm building a C++ executable that needs to #include "Python.h" from the user's Python installation. To express Python.h (and the various header files it includes) in Bazel, I need to know where the Python include directory is. This location will be different on Windows and Linux, and I'd like a single Bazel configuration to build them both. What's the best Bazel practice for referencing software that exists outside of the WORKSPACE root? 回答1: So to tell Bazel about external dependencies you

谷歌是如何解决Docker镜像体积太大的问题的

 ̄綄美尐妖づ 提交于 2019-12-07 13:05:30
28 分享 0 Matthew Moore是谷歌公司的资深工程师,专注于谷歌 Docker技术的应用,他是谷歌最早落地 Docker技术团队的核心成员。在 2017 swampUP大会的演讲上,他为大家介绍了谷歌使用 Docker技术的心得。本文对演讲视频进行了整理和归纳,原视频地址: https://www.youtube.com/watch?v=lviLZFciDv4&list=PLY0Zjn5rFo4MFIwbYtQx4wD1KK7HleIzk&index=15 虚拟机的问题 最初,大家都使用虚拟机作为软件的运行环境,对外提供服务。为了在虚拟机上运行你的 Service,你不得不运行一大堆程序: 系统进程 定时任务 SSH 安装 Agent 安装 Bash 安装一大堆 libs 其实,你仅仅只是想让你的 Service运行起来,但你不得不维护一个 40GB的虚拟机 。 然后你开始试用 Docker 开始试用 Docker,你毫不犹豫选择了和之前虚拟机一样的镜像:Ubuntu 1404,将之前的虚机的内容复制到了 Docker镜像,安装了一堆软件, 最后发现你的 Docker镜像有 8GB。 谷歌的 Docker镜像构建实践 找到最小的基础镜像 Alpine Linux是基于 musl和 BusyBox的操作系统,目的是为了为用户提供更高效的资源使用效率。它的特性是体积小

How to resolve bazel “undeclared inclusion(s)” error?

为君一笑 提交于 2019-12-07 07:05:17
问题 I'm new to bazel, and I'm getting a failure to build my C++ package with ERROR: /path/to/package/BUILD:linenumber:1 undeclared inclusion(s) in rule '//path/to/package:name': this rule is missing dependency declarations for the following files included by 'path/to/package/source_file.cpp' ...followed by a list of header files in a different directory. These files are not part of the package that is being built, but are being pulled in from elsewhere. My question is how to properly add the

Why is a publicly visible Bazel ProtoBuf target 'not declared'

北战南征 提交于 2019-12-06 13:55:38
I'm attempting to use Bazel's Protocol Buffer Rules to compile (generate) Python language bindings and any dependencies. The layout of my project is simple, with a single directory, proto , containing the .proto file and BUILD file. WORKSPACE BUILD.six |-- proto | |-- example.proto | |-- BUILD My WORKSPACE file: workspace(name = "com_example") http_archive( name = "com_google_protobuf", strip_prefix = "protobuf-3.4.1", urls = ["https://github.com/google/protobuf/archive/v3.4.1.zip"], ) new_http_archive( name = "six_archive", build_file = "six.BUILD", url = "https://pypi.python.org/packages

TensorFlow fails to compile

 ̄綄美尐妖づ 提交于 2019-12-06 04:23:58
问题 Getting the following errors which trying to compile TensorFlow from source. Any thoughts would be helpful. bazel-out/host/bin/_solib_local/_U_S_Stensorflow_Spython_Cgen_Unn_Uops_Upy_Uwrappers_Ucc___Utensorflow/libtensorflow_framework.so: undefined reference to `cublasGemmEx@libcublas.so.9.0' bazel-out/host/bin/_solib_local/_U_S_Stensorflow_Spython_Cgen_Unn_Uops_Upy_Uwrappers_Ucc___Utensorflow/libtensorflow_framework.so: undefined reference to `cublasZhpmv_v2@libcublas.so.9.0' bazel-out/host

Importing Bazel Project fails in CLion on macOS

时光总嘲笑我的痴心妄想 提交于 2019-12-06 04:03:28
问题 I installed Bazel plugin on my CLion and am trying to import a new Bazel C++ project and I keep hitting into these errors- tensorflow_gpu-1.8.0lft1-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform. ERROR: error loading package '': Encountered error while reading extension file 'requirements.bzl': no such package '@my_deps//': Traceback (most recent call last): File "/private/var/tmp/_bazel_pmanjunath/0f9184e7a61c3740275307da0cc42014/external/io_bazel_rules_python/python

How do I tell Bazel where Python.h lives?

感情迁移 提交于 2019-12-06 03:28:50
I'm building a C++ executable that needs to #include "Python.h" from the user's Python installation. To express Python.h (and the various header files it includes) in Bazel, I need to know where the Python include directory is. This location will be different on Windows and Linux, and I'd like a single Bazel configuration to build them both. What's the best Bazel practice for referencing software that exists outside of the WORKSPACE root? So to tell Bazel about external dependencies you need to use one of the Workspace Rules to specify the location of the external dependency, as well as the

Building TensorFlow from source on Ubuntu 16.04 w/ GPU: `GLIBCXX_3.4.20' not found

◇◆丶佛笑我妖孽 提交于 2019-12-05 20:19:08
I'm on Ubuntu 16.04 and am trying to build TensorFlow with GPU support from source according to this . Everything works fine until the "Build TensorFlow" step, in which I execute: bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package The compilation hits an error with output: ERROR: /home/thomas/tensorflow/tensorflow/core/BUILD:978:28: Executing genrule //tensorflow/core:proto_text_srcs_all failed: bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with