-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is very mundane -- how to install (and run bazel..). #18
Comments
I think the two build commands are: Python: C++: 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' |
Riegeli is now available as Bzlmod in bazelbuild/bazel-central-registry#2186 — except for TensorFlow bindings, because TensorFlow does not support Bzlmod yet. |
Using datumest instruction, I'm getting this error:
I don't get what is wrong unfortunately. |
Unfortunately Riegeli/TensorFlow bindings are currently broken in open source since moving from the WORKSPACE model to Bzlmod in d3b2c5d, because TensorFlow does not support Bzlmod yet. The upgrade from WORKSPACE to Bzlmod was long overdue, together with updating several dependencies (e.g. Abseil and Protobuf), which enabled code optimizations (e.g. The build was already incompatible with newer versions of TensorFlow. Actually all old versions it was once compatible with were already removed from TensorFlow sites. Riegeli/TensorFlow bindings were outdated and brittle, using precompiled TensorFlow, which ties other libraries (Abseil, Protobuf, Python) to exact versions used by the precompiled TensorFlow (but before that they were even more brittle when TensorFlow was built from source). I am sorry, Riegeli/TensorFlow bindings are waiting for some brave soul with deep enough knowledge of bazel and TensorFlow to fix them. |
And if you are trying //python:build_pip_package, then this was never finished. All other parts of open source Riegeli should work. |
@QrczakMK thanks for the info. Too bad i guess. So there is no possible way to install riegeli as python lib right now? |
It should work if the usage is through bazel (Riegeli/Python tests work in open source). Pip is currently not supported, so I suppose it will not be convenient for non-bazel usages. |
Got it, thanks. So, to build riegeli i need to just type |
Yes. And to use Riegeli from another project, it should import Riegeli from its |
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:
I was able to get
bazel build //riegeli/base:status
to work, butbazel 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.
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:
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
The text was updated successfully, but these errors were encountered: