models icon indicating copy to clipboard operation
models copied to clipboard

Dockefile Build issue

Open nehalbhanushali opened this issue 9 years ago • 9 comments

MODEL : models/syntaxnet/Dockerfile

ERROR:

Step 7 : COPY WORKSPACE $SYNTAXNETDIR/syntaxnet/WORKSPACE
lstat WORKSPACE: no such file or directory

nehalbhanushali avatar Mar 23 '17 23:03 nehalbhanushali

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

nehalbhanushali avatar Mar 24 '17 02:03 nehalbhanushali

Am I on the right track?

  1. cloned models repository
  2. went to syntaxnet and cloned tensorflow repository
  3. 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

nehalbhanushali avatar Mar 24 '17 04:03 nehalbhanushali

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

bogatyy avatar Mar 24 '17 17:03 bogatyy

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.

  1. parsey_msparseface
  2. 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?

nehalbhanushali avatar Mar 24 '17 20:03 nehalbhanushali

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)

bogatyy avatar Mar 24 '17 22:03 bogatyy

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

nehalbhanushali avatar Mar 25 '17 01:03 nehalbhanushali

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/

nehalbhanushali avatar Mar 25 '17 01:03 nehalbhanushali

If you run bazel test ... it will build the missing bazel-bin/syntaxnet/parser_eval and should work

Tyruiop avatar Mar 25 '17 23:03 Tyruiop

Thanks 👍

nehalbhanushali avatar Mar 26 '17 03:03 nehalbhanushali