This is very mundane -- how to install (and run bazel..).
rozim opened this issue · 4 comments
For the life of me I can't find any installation instructions nor by thrashing around can I figure out the right bazel invocation.
I'm guessing the instructions would be something like:
- install bazel
- git clone https://github.com/google/riegeli.git
- cd riegeli
- ./configure
- bazel build ???
I was able to get bazel build //riegeli/base:status
to work, but bazel build //riegeli/...
is unhappy:
`ERROR: /Users/dave/Projects/riegeli/riegeli/tensorflow/io/BUILD:27:11: no such package 'third_party/tensorflow/core/platform':
BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.
- /Users/dave/Projects/riegeli/third_party/tensorflow/core/platform and referenced by '//riegeli/tensorflow/io:file_writer'`
I'm on a Macbook Air, the M1, and its tensorflow is a bit funky, which may be another issue
as I had to fix the output of ./configure since when you import tensorflow you get some
debug output:
python -c "import tensorflow"
Init Plugin
Init Graph Optimizer
Init Kernel
My goal is to get a c++ and python library built.
Basic info:
uname -a: Darwin daves-air.lan 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:27 PDT 2021; root:xnu-7195.141.2~5/RELEASE_ARM64_T81
01 arm64
Python 3.9.4
TF: 2.5.0
thx,
Dave
I think the two build commands are:
Python:
bazel build python/riegeli:riegeli
C++:
bazel build riegeli/records:all
but the C++ build seems to be failing at the moment.
All known build failures are fixed now. If it still does not build, please show error messages.
Currently working (as of 2023-04-15) on Linux is something like the following:
mkdir -p ~/src/riegeli_demo
cd !$
python -m venv venv
. ./venv/bin/activate
# or for M1 macs, tensorflow-macos==v2.11.1, but I can't test this right now
python -m pip install tensorflow==v2.11.1
mkdir third_party
cd third_party/
git clone https://github.com/google/riegeli
cd riegeli/
./configure
# Bazel's cache is directory-based, and may retain old generated buildrules
# If you've previously tried compiling against tf>=v2.12, currently broken, do this
bazel clean --expunge
bazel build //python:build_pip_package
# NOTE: Currently broken for `bazel run //${THIS_TARGET} -- ${FLAGS}`
python/build_pip_package.sh --bdist --dest $(realpath ~/src/riegeli_demo/riegeli)
cd ~/src/riegeli_demo/
python -m pip install riegeli/riegeli-*
# This should run without errors
python -c 'import riegeli'