capeprivacy / tf-trusted

tf-trusted allows you to run TensorFlow models in secure enclaves

Home Page:https://capeprivacy.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build error according to README

overunix opened this issue · comments

Dears,

I try the build ( refer https://github.com/dropoutlabs/tf-trusted#build-and-run-tf-trusted ) and failed with following error message.

Could you help with this ?

$ docker run -it --name tf-trusted --rm
-v droplab-bazel-cache:/root/.cache/bazel
-v pwd:/opt/my-project
-w /opt/my-project
-p 50051:50051/tcp -p 50051:50051/udp
gcr.io/asylo-framework/asylo
bazel run --config=enc-sim //tf_trusted
Starting local Bazel server and connecting to it...
INFO: Invocation ID: 3e917c6f-8fa6-4d54-aaac-78acb786e384
ERROR: /root/.cache/bazel/_bazel_root/b6bc0828d5b43c7085b650e0698bf388/external/com_google_protobuf/BUILD:599:1: Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/b6bc0828d5b43c7085b650e0698bf388/external/com_google_protobuf/BUILD", line 599
internal_gen_well_known_protos_java(srcs = WELL_KNOWN_PROTOS)
File "/root/.cache/bazel/_bazel_root/b6bc0828d5b43c7085b650e0698bf388/external/com_google_protobuf/protobuf.bzl", line 266, in internal_gen_well_known_protos_java
Label(("%s//protobuf_java" % REPOSITOR...))
File "/root/.cache/bazel/_bazel_root/b6bc0828d5b43c7085b650e0698bf388/external/com_google_protobuf/protobuf.bzl", line 266, in Label
REPOSITORY_NAME
builtin variable 'REPOSITORY_NAME' is referenced before assignment.
ERROR: /root/.cache/bazel/_bazel_root/b6bc0828d5b43c7085b650e0698bf388/external/com_google_protobuf/BUILD:382:1: Target '@com_google_protobuf//:android' contains an error and its package is in error and referenced by '@com_google_protobuf//:protoc'
ERROR: /root/.cache/bazel/_bazel_root/b6bc0828d5b43c7085b650e0698bf388/external/com_google_protobuf/BUILD:382:1: Target '@com_google_protobuf//:windows' contains an error and its package is in error and referenced by '@com_google_protobuf//:protoc'
ERROR: /root/.cache/bazel/_bazel_root/b6bc0828d5b43c7085b650e0698bf388/external/com_google_protobuf/BUILD:382:1: Target '@com_google_protobuf//:windows_msvc' contains an error and its package is in error and referenced by '@com_google_protobuf//:protoc'
ERROR: /root/.cache/bazel/_bazel_root/b6bc0828d5b43c7085b650e0698bf388/external/com_github_grpc_grpc/src/proto/grpc/reflection/v1alpha/BUILD:21:1: every rule of type proto_library implicitly depends upon the target '@com_google_protobuf//:protoc', but this target could not be found because of: Target '@com_google_protobuf//:protoc' contains an error and its package is in error
ERROR: Analysis of target '//tf_trusted:tf_trusted' failed; build aborted: Analysis failed
INFO: Elapsed time: 214.936s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (44 packages loaded, 2433 targets
FAILED: Build did NOT complete successfully (44 packages loaded, 2433 targets
configured)
currently loading: @org_tensorflow//tensorflow/contrib/lite/kernels
Fetching @boringssl; fetching 8s
Fetching @Jinja; fetching

Hey there @overunix,

It looks like Asylo recently released a new docker container with some breaking changes to our current setup. I think this can be fixed once tensorflow as released version 1.13.0. Until that happens and we do some upgrades here we can use the older version of the Asylo docker container. So instead of:

docker pull gcr.io/asylo-framework/asylo

docker run -it --rm \
  -v bazel-cache:/root/.cache/bazel \
  -v `pwd`:/opt/my-project \
  -w /opt/my-project \
  -p 50051:50051/tcp -p 50051:50051/udp \
  gcr.io/asylo-framework/asylo \
  bazel run --config=enc-sim //tf_trusted

We can do:

docker pull gcr.io/asylo-framework/asylo:buildenv-v0.3.2

docker run -it --rm \
  -v bazel-cache:/root/.cache/bazel \
  -v `pwd`:/opt/my-project \
  -w /opt/my-project \
  -p 50051:50051/tcp -p 50051:50051/udp \
  gcr.io/asylo-framework/asylo:buildenv-v0.3.2 \
  bazel run --config=enc-sim //tf_trusted

Note I've just added the buildenv-v0.3.2 tag to the docker container name!

I'll update the docs to pin to this version.

Thanks for the bug! And let me know if you have any other questions. Happy to help!

Now works, thanks for quick response @justin1121 .