0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Install Bazel v0.18.1, for building tensorflow v1.12.1 from source.

Last updated at Posted at 2019-05-18

1. Requirements

Ubuntu16.04

2. Refference

https://docs.bazel.build/versions/master/install-ubuntu.html
https://docs.bazel.build/versions/master/tutorial/cpp.html

3. Install Bazel v0.18.1

sudo apt-get install pkg-config zip g++ zlib1g-dev unzip python
wget https://github.com/bazelbuild/bazel/releases/download/0.18.1/ bazel-0.18.1-installer-linux-x86_64.sh
chmod +x bazel-0.18.1-installer-linux-x86_64.sh
./bazel-0.18.1-installer-linux-x86_64.sh --user
sed -i -e '$ a export PATH="$PATH:$HOME/bin"' .bash_profile
source .bash_profile

4. Build c++ sample code by using Bazel

git clone https://github.com/bazelbuild/examples/
cd examples/cpp-tutorial/stage1
bazel build //main:hello-world
./bazel-bin/main/hello-world

5. Result

Hello world
Sat May 18 13:53:53 2019

Thank you.
last-samurai

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?