I am trying to find out which version of Bazel I currently have on my computer to install TensorFlow from source (it requires version 0.1.4)
evan#evan-box:~/Apps/tensorflow$ bazel --version
Unknown Bazel startup option: '--version'.
For more info, run 'blaze help startup_options'.
evan#evan-box:~/Apps/tensorflow$ bazel version
Build label: head (#125b349)
Build target: bazel-out/local_linux-fastbuild/bin/src/main/java/bazel-main_deploy.jar
Build time: Fri Nov 13 01:23:30 2015 (1447377810)
Build timestamp: 1447377810
Build timestamp as int: 1447377810
So where is the version actually?
See Bazel users manual
From the command line:
$ bazel version
Build label: 0.1.1
Since bazel version 0.27.0 there is bazel --version available, without the side-effect of starting the server daemon.
Related
A question when I was trying to use command Bazel build to build TensorFlow. After I entered this command:
bazel build tensorflow/tools/graph_transforms:transform_graph
The compile started, and about 3 minutes later, it said
this (below you can see I check my cudnn and cuda version)
Anyone could help me with this?
Works on my machine
Just did a checkout of TensorFlow:
git clone https://github.com/tensorflow/tensorflow.git
Then build the target (using bazelisk):
bazelisk build tensorflow/tools/graph_transforms:transform_graph
The build of the target succeeds:
INFO: Elapsed time: 2111.652s, Critical Path: 293.22s
INFO: 5811 processes: 5811 local.
INFO: Build completed successfully, 5969 total actions
CUDA version check:
cat /usr/local/cuda/version.txt gives me CUDA Version 10.0.130
bazelisk version gives me 1.1.0
lsb_release -a
results in:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
Your machine
There is an error reported:
unsupported gpu architecture 'compute_36'
It seems that nvcc cannot compile your CUDA code, since the define GPU architecture is not supported.
Also, Bazel advises you to use the --verbose_failures flag to get more details about our error.
I am facing a problem when trying to use tensorflow-gpu 1.6+ precompiled packages on Windows 10. As it states in the release notes, the new builds have the AVX instructions included, which aren't supported by my CPU (Xeon 5670).
I am using Cuda 9.1 and CUDNN 7.1 which works fine with prebuild tensorflow-gpu 1.5 version.
When I am trying to compile, either with CMAKE or bazel my build fails.
With CMAKE I get 2 compilation errors and with bazel 1.
I am using this guide as reference.http://www.python36.com/install-tensorflow-gpu-windows/ for CMAKE and for bazel I used MINGW64 to run ./configure and then bazel build command.
I have also tried at first with Visual Studio 2017, now with 2015 and both of them fail to build.
I have all the prerequisites downloaded and installed.
CMAKE version: 3.11.1
Bazel version: bazel-0.13.0-windows-x86_64.exe
Any hints or info would be appreciated!
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 clean and bazel clean --expunge but it didn't help and still Bazel doesn't see my xcode (I suppose) but it's completely installed. I even reinstalled it to make sure that all works fine but the error didn't disappeared
My Bazel version is
Build label: 0.5.2-homebrew
Build target: bazel-out/darwin_x86_64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu Jul 13 12:29:40 2017 (1499948980)
Build timestamp: 1499948980
Build timestamp as int: 1499948980
KakaduDevs-Mac-mini:serving Kakadu$
OS is MacOS Sierra version 10.12.5
What should I do to specify Xcode version in bazel to avoid this error? It seems that the error is common but I haven't found how I can make the bazel build.
P.S I'm trying to install tensorflow-serving the way it's explained here.
https://tensorflow.github.io/serving/setup
bazel clean --expunge
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -license
bazel clean --expunge
bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
Had the same problem, and since I am using a beta version of XCode, I had to find the installation in /Downloads/Xcode-beta.app instead.
Incidentally, the solution for me was to open XCode, go to Preferences, and select the Locations tab. The Command Line Tools drop-down was blank, and I had to press it and select a version (Xcode 9.0 in my case). I then ran bazel clean --expunge and repeated the build process without getting the error. Hope this helps someone.
It looks like xcode_configure isn't properly identifying that you have xcode installed. This can sometimes happen if you install xcode but have not yet fully opened it (it may ask you to agree to Terms and Conditions before being fully functional). If this is the problem, you'll need to bazel clean --expunge again after that...
If this doesn't help, you can get some debug information to identify what's gone wrong, by invoking (after a failed build):
cat $(bazel info output_base)/external/local_config_xcode/BUILD
This should contain some comments pertaining to failures in finding your installed xcodes.
For me it was a licensing issue for xcodebuild. After running
bazel clean --expunge
I've tried to run again bazel and I've got the instruction to run
sudo xcodebuild -license.
I have executed, accepted the license terms, run again
bazel clean --expunge
and everything has started to work again.
Hopefully it solves some of the cases.
In order to build objc, Bazel requires that you specify an xcode version - this is usually done automatically by xcode_configure. If that's not working, you can manually specify the xcode version on the command line using the --xcode_version flag.
Hi all I am trying to install tensor flow with GPU compatibility using this guide "guide 1" and guide 2 on ubuntu pc (cuda 8). I am stuck at installing tensorflow,
when I use ./configure, I getting this error
ERROR: /home/krishna/tensorflow/WORKSPACE:3:1: //external:io_bazel_rules_closure: no such attribute 'urls' in 'http_archive' rule.
ERROR: /home/krishna/tensorflow/WORKSPACE:3:1: //external:io_bazel_rules_closure: missing value for mandatory attribute 'url' in 'http_archive' rule.
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package '': Encountered error while reading extension file 'closure/defs.bzl': no such package '#io_bazel_rules_closure//closure': error loading package 'external': Could not load //external package.
I am new to ubuntu, after reading a lot I understood that, the error has something to do with "version of bazel" (for version above 0.3.1 it does not apper).
When I use the command
$bazel version
Build label: 0.3.0
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Fri Jun 10 11:38:23 2016 (1465558703)
Build timestamp: 1465558703
Build timestamp as int: 1465558703
when i use
$ sudo apt-get install bazel
Reading package lists... Done
Building dependency tree
Reading state information... Done
bazel is already the newest version (0.4.5).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
and
upgraded it using $ sudo apt-get upgrade bazel. Finally I tried
$ bazel version
Build label: 0.3.0
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Fri Jun 10 11:38:23 2016 (1465558703)
Build timestamp: 1465558703
Build timestamp as int: 1465558703
which shows me that I am at version 0.3.0. I even tried compiling tensorflow again,which gave me the same above error.
It looks like you have two versions of Bazel on your system (0.3.0 and 0.4.5). You can see what the current binary is by running which bazel. You can find all of the bazels on your system by running:
$ updatedb # This will take a while.
$ slocate bazel
Assuming this returns something like:
/etc/bazel/bin/bazel
/usr/bin/bazel
you can figure out which bazel is the "right" one (0.4.5) by running /usr/bin/bazel version etc. for each bazel slocate finds.
Once you find the right bazel, you want that to be the default, so you have to make sure Linux searches for Bazel in that directory first. If the right bazel is /usr/local/bin/bazel, you'd run:
$ export PATH="/usr/local/bin:$PATH"
Then you should be able to call "bazel" normally and your system will find the "right" one (you can also delete any old ones you find).
Alternatively, you can install Bazel using the installer which will tell you what directory it got installed in.
I'm trying to install Tensorflow from the source using the following configuration:
NVIDIA GTX 1070
UBUNTU 16.04
CUDA 8.0
Cudnn v5.0
I have followed the following steps from here:
installed bazel
installed dependencies
installed CUDA support
./configure with CUDA 8.0 support
bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
After this step, to my knowledge, there should be a bazel-bin directory, so that I can subsequently execute
$ bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
# The name of the .whl file will depend on your platform.
$ sudo pip install /tmp/tensorflow_pkg/tensorflow-0.10.0rc0-py2-none-any.whl
However, there is no such directory.
I have a feeling this error message might have something to do with it?
ERROR: /usr/local/lib/python2.7/dist-packages/tensorflow_clone/tensorflow/contrib/rnn/BUILD:45:1: error while parsing .d file: /home/volcart/.cache/bazel/_bazel_volcart/62dff5ffffc63bcd8a9350984645e0be/execroot/tensorflow_clone/bazel-out/local_linux-opt/bin/tensorflow/contrib/rnn/_objs/python/ops/_lstm_ops_gpu/tensorflow/contrib/rnn/kernels/lstm_ops_gpu.cu.pic.d (No such file or directory).
nvcc warning : option '--relaxed-constexpr' has been deprecated and replaced by option '--expt-relaxed-constexpr'.
In file included from third_party/gpus/cuda/include/cuda_runtime.h:78:0,
from <command-line>:0:
third_party/gpus/cuda/include/host_config.h:115:2: error: #error -- unsupported GNU version! gcc versions later than 5.3 are not supported!
#error -- unsupported GNU version! gcc versions later than 5.3 are not supported!
Upon re-executing bazel build ... I found this...
WARNING: /usr/local/lib/python2.7/dist-packages/tensorflow/util/python/BUILD:11:16: in includes attribute of cc_library rule //util/python:python_headers: 'python_include' resolves to 'util/python/python_include' not in 'third_party'. This will be an error in the future.
I should also add this...
$ bazel version
Build label: 0.3.1
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Fri Jul 29 09:09:52 2016 (1469783392)
Build timestamp: 1469783392
Build timestamp as int: 1469783392
bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
Caused a permissions issue. Added sudo
sudo bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package