Dockefile Build issue
MODEL : models/syntaxnet/Dockerfile
ERROR:
Step 7 : COPY WORKSPACE $SYNTAXNETDIR/syntaxnet/WORKSPACE
lstat WORKSPACE: no such file or directory
NEW ISSUE IN BUILD
/bin/sh: 1: tensorflow/tools/ci_build/builds/configured: not found
Removing intermediate container acfe081becc6
Step 9 : COPY tensorflow $SYNTAXNETDIR/syntaxnet/tensorflow
---> a79ffd189dd5
Removing intermediate container f9fb9e6fb267
Step 10 : RUN cd $SYNTAXNETDIR/syntaxnet/tensorflow && tensorflow/tools/ci_build/builds/configured CPU && cd $SYNTAXNETDIR/syntaxnet && bazel build -c opt @org_tensorflow//tensorflow:tensorflow_py
---> Running in 70008f8c82b3
/bin/sh: 1: tensorflow/tools/ci_build/builds/configured: not found
The command '/bin/sh -c cd $SYNTAXNETDIR/syntaxnet/tensorflow && tensorflow/tools/ci_build/builds/configured CPU && cd $SYNTAXNETDIR/syntaxnet && bazel build -c opt @org_tensorflow//tensorflow:tensorflow_py' returned a non-zero code: 127
Am I on the right track?
- cloned models repository
- went to syntaxnet and cloned tensorflow repository
- built the Dockerfile in syntaxnet to a docker image.
Build ended with the following error:
Using python library path: /usr/local/lib/python2.7/dist-packages
No OpenCL support will be enabled for TensorFlow
Configuration finished
Extracting Bazel installation...
............
ERROR: /opt/tensorflow/syntaxnet/tensorflow/third_party/gpus/cuda_configure.bzl:828:18: unexpected keyword 'environ' in call to repository_rule(implementation: function, *, attrs: dict or NoneType = None, local: bool = False).
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package '': Extension file 'third_party/gpus/cuda_configure.bzl' has errors.
The command '/bin/sh -c cd $SYNTAXNETDIR/syntaxnet/tensorflow && tensorflow/tools/ci_build/builds/configured CPU && cd $SYNTAXNETDIR/syntaxnet && bazel build -c opt @org_tensorflow//tensorflow:tensorflow_py' returned a non-zero code: 2
Step 2 - instead, could you try cloning with recursion?
git clone --recursive https://github.com/tensorflow/models.git
Also, unless you want to change the code and build those changes into your own image, consider just using our pre-built image: https://hub.docker.com/r/tensorflow/syntaxnet/ https://github.com/tensorflow/models/blob/master/syntaxnet/g3doc/CLOUD.md
Thank you @bogatyy
But this pre built image does not seem to have the parsey_universal module for parseys cousins. The github repository models>syntaxnet>syntaxnet>models has two modules.
- parsey_msparseface
- parsey_universal (this is what I am looking for)
I could not find the 2nd module in the prebuilt image. Could you point me to it?
Good catch! Updated the docker image, can you re-pull and try again?
Also, did it work out with building your own image if you don't clone TF separately? (if may lead to a version mismatch)
Cloning recursively also left me with some errors. I am not able to locate the error during build, but this is what I get when I try a German sentence
root@76493f70b3ea:/opt/tensorflow/syntaxnet# echo "Ich bin ein Berliner." | syntaxnet/models/parsey_universal/parse.sh $MODEL_DIRECTORY
syntaxnet/models/parsey_universal/parse.sh: line 32: bazel-bin/syntaxnet/parser_eval: No such file or directory
syntaxnet/models/parsey_universal/parse.sh: line 45: bazel-bin/syntaxnet/parser_eval: No such file or directory
syntaxnet/models/parsey_universal/parse.sh: line 58: bazel-bin/syntaxnet/parser_eval: No such file or directory
Docker image has the parsey_universal module now. But the above error remains the same.
Steps to reproduce:
1.
docker run -ti tensorflow/syntaxnet bash
2.
cd models
curl -O http://download.tensorflow.org/models/parsey_universal/German.zip
unzip German.zip
export MODEL_DIRECTORY=/opt/tensorflow/syntaxnet/models/German
cd ..
echo "Ich bin ein Berliner." | syntaxnet/models/parsey_universal/parse.sh $MODEL_DIRECTORY
Ref : http://technobium.com/a-glimpse-into-syntaxnet-the-worlds-most-accurate-parser/
If you run bazel test ... it will build the missing bazel-bin/syntaxnet/parser_eval and should work
Thanks 👍