1
votes

This is about a tensorboard which is built from source, not about pip-installed one.

I could successfully build it.

$ git clone https://github.com/tensorflow/tensorboard.git
$ cd tensorboard/
$ bazel build //tensorboard
tensorflow/tensorboard$ bazel build //tensorboard
Starting local Bazel server and connecting to it...
......................................
         : (log messages here)
Target //tensorboard:tensorboard up-to-date:
  bazel-bin/tensorboard/tensorboard
INFO: Elapsed time: 326.553s, Critical Path: 187.92s
INFO: 619 processes: 456 linux-sandbox, 12 local, 151 worker.
INFO: Build completed successfully, 1268 total actions

Then yes I can run it as documented in tensorboard/README.md, and it works.

$ ./bazel-bin/tensorboard/tensorboard --logdir path/to/logs

The problem is, I'd like to run it as if installed via pip like this:

$ tensorboard --logdir path/to/logs

But as far as I looked for, no script provided to create .whl file so that we can locally-pip-install it, unlike tensorflow provides one like this.

$ bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
$ sudo pip install /tmp/tensorflow_pkg/tensorflow-1.8.0-py2-none-any.whl

So... can anybody show how to do that? Making packaging script would solve this, but it should exist somewhere as long as tensorboard is provided via pip anyway. :)

My workaround so far is not clean enough:

$ ln -s /my/build/folder/tensorboard/bazel-bin/tensorboard/tensorboard ~/bin
$ ln -s /my/build/folder/tensorboard/bazel-bin/tensorboard/tensorboard.runfiles ~/bin

I appreciate your suggestions, thanks!

Update July-21:

Thanks to W JC, I found instruction is already there in tensorboard/pip_package/BUILD.

# rm -rf /tmp/tensorboard
# bazel run //tensorboard/pip_package:build_pip_package
# pip install -U /tmp/tensorboard/*py2*.pip

Though unfortunately it shows error in my environment, and I guess it's local issue maybe because I'm using anaconda.

But basically the problem was resolved. It should basically work as long as running on supported environment.

1

1 Answers

2
votes

It seems there exists an script in the /tensorboard/pip_packages try to build wheels