Skip to content
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

docker tensorflow build fail Extension file not found: 'google/protobuf/protobuf.bzl'. #10

Open
tobigithub opened this issue Nov 26, 2015 · 1 comment
Labels

Comments

@tobigithub
Copy link
Owner

with

sudo docker build -t $USER/tensorflow-full -f tensorflow/tensorflow/tools/docker/Dockerfile.cpu .

Extension file not found: 'google/protobuf/protobuf.bzl'.

ubuntu@ubuntu-virtual-machine:~$ sudo docker build -t $USER/tensorflow-full -f tensorflow/tensorflow/tools/docker/Dockerfile.cpu .
Sending build context to Docker daemon 258.2 MB
Step 1 : FROM b.gcr.io/tensorflow/tensorflow
 ---> 217daf2537d2
Step 2 : MAINTAINER Craig Citro <[email protected]>
 ---> Using cache
 ---> c2360ebde114
Step 3 : RUN apt-get update && apt-get install -y         g++         pkg-config         python-dev         python-numpy         python-pip         software-properties-common         swig         unzip         wget         zip         zlib1g-dev         &&     apt-get clean &&     rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 7ec3c49697a3
Step 4 : RUN add-apt-repository -y ppa:openjdk-r/ppa &&     apt-get update &&     apt-get install -y openjdk-8-jdk openjdk-8-jre-headless &&     apt-get clean &&     rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 786647746054
Step 5 : RUN echo "startup --batch" >>/root/.bazelrc
 ---> Using cache
 ---> 99290d26b5eb
Step 6 : RUN echo "build --spawn_strategy=standalone --genrule_strategy=standalone"     >>/root/.bazelrc
 ---> Using cache
 ---> 2d5f8fd5f439
Step 7 : ENV BAZELRC /root/.bazelrc
 ---> Using cache
 ---> 024084c8fcec
Step 8 : ENV BAZEL_VERSION 0.1.1
 ---> Using cache
 ---> d1cea0cd4f37
Step 9 : WORKDIR /
 ---> Using cache
 ---> 1041a88b5eae
Step 10 : RUN mkdir /bazel &&     cd /bazel &&     wget https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh &&     wget -O /bazel/LICENSE.txt https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE.txt &&     chmod +x bazel-*.sh &&     ./bazel-$BAZEL_VERSION-installer-linux-x86_64.sh &&     cd / &&     rm -f /bazel/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh
 ---> Using cache
 ---> 8143b28e5a79
Step 11 : WORKDIR /tensorflow
 ---> Using cache
 ---> 760322cf243f
Step 12 : COPY tensorflow /tensorflow
 ---> Using cache
 ---> c7283bd3b281
Step 13 : RUN bazel clean &&     bazel build -c opt tensorflow/tools/pip_package:build_pip_package &&     bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/pip &&     pip install --upgrade /tmp/pip/tensorflow-*.whl
 ---> Running in 58f1afacc2c2
INFO: Reading 'startup' options from /root/.bazelrc: --batch
____Starting clean (this may take a while). Consider using --expunge_async if the clean takes more than several minutes.
INFO: Reading 'startup' options from /root/.bazelrc: --batch
____Loading package: tensorflow/tools/pip_package
____Loading...
____Loading package: tensorflow
____Loading package: tools/cpp
____Loading package: tensorflow/models/rnn
____Loading package: tensorflow/python
____Loading package: tensorflow/models/rnn
____Loading package: tensorflow/python
ERROR: /tensorflow/tensorflow/python/BUILD:1: Extension file not found: 'google/protobuf/protobuf.bzl'.
ERROR: /tensorflow/tensorflow/tensorboard/BUILD:43:1: error loading package 'tensorflow/python': Extension file not found: 'google/protobuf/protobuf.bzl' and referenced by '//tensorflow/tensorboard:tensorboard'.
ERROR: Loading failed; build aborted.
____Elapsed time: 1.765s
The command '/bin/sh -c bazel clean &&     bazel build -c opt tensorflow/tools/pip_package:build_pip_package &&     bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/pip &&     pip install --upgrade /tmp/pip/tensorflow-*.whl' returned a non-zero code: 1
ubuntu@ubuntu-virtual-machine:~$ 

@tobigithub
Copy link
Owner Author

tensorflow documention is wrong at https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools/docker use

$ git clone --recurse-submodules https://github.com/tensorflow/tensorflow
$ sudo docker build -t $USER/tensorflow-full -f tensorflow/tensorflow/tools/docker/Dockerfile.cpu .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant