tensorflow / models

Models and examples built with TensorFlow
Other
77.18k stars 45.76k forks source link

textsum::The 'build' command is only supported from within a workspace. #497

Closed monajalal closed 8 years ago

monajalal commented 8 years ago
jalal@klein:~/computer_vision/tensorflow/models$  bazel build -c opt --config=cuda textsum/...
The 'build' command is only supported from within a workspace.

Can you please help with the fix? @peterjliu @panyx0718

panyx0718 commented 8 years ago

Have you created WORKSPACE file?

On Mon, Oct 3, 2016 at 4:37 PM, Mona Jalal notifications@github.com wrote:

Please let us know which model this issue is about (specify the top-level directory)

On Ubuntu 16.04 I get this error:

jalal@klein:~/computer_vision/tensorflow/models$ bazel build -c opt --config=cuda textsum/... The 'build' command is only supported from within a workspace.

Can you please help with the fix? @peterjliu https://github.com/peterjliu @panyx0718 https://github.com/panyx0718

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tensorflow/models/issues/497, or mute the thread https://github.com/notifications/unsubscribe-auth/ACwQe9cUfElvU6PFVtZwK6W-V-YZyHcNks5qwZHDgaJpZM4KNKKa .

Thanks Xin

monajalal commented 8 years ago

jalal@klein:~/computer_vision/tensorflow/models$ touch WORKSPACE solved the problem. I think it would be great to have this command in the readme because the page that provides installation guide for the bazel doesn't tell this :)

panyx0718 commented 8 years ago

I believe the README described it :)

On Mon, Oct 3, 2016 at 4:48 PM, Mona Jalal notifications@github.com wrote:

Closed #497 https://github.com/tensorflow/models/issues/497.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tensorflow/models/issues/497#event-811068753, or mute the thread https://github.com/notifications/unsubscribe-auth/ACwQexgAiQSX6RQBluavpadkIs5AZCNDks5qwZQ1gaJpZM4KNKKa .

Thanks Xin

martianmartian commented 7 years ago

can someone post a link here as to where to look at? still not getting it..

MotorCityCobra commented 7 years ago

I don't understand this mysterious WORKSPACE directory either. Am I to create a new folder in my root directory and rename it 'WORKSPACE'? I don't see this written anywhere in the install instructions.

YunkaiXiao commented 7 years ago

I think it's an empty file called WORKSPACE.

MotorCityCobra commented 7 years ago

So you are to create an empty file name WORKSPACE Then cd into it and enter 'touch WORKSPACE' From patching together clues from this thread and Bazel's half assed instruction page I think I've got it.

YunkaiXiao commented 7 years ago

You don't cd into WORKSPACE, touch WORKSPACE creates this empty file.

MotorCityCobra commented 7 years ago

The install instruction for this github dir 'models' says to. Go look at it...

cd $HOME/workspace git clone https://github.com/tensorflow/models/ This will put the TF-Slim image models library in $HOME/workspace/models/slim. (It will also create a directory called models/inception, which contains an older version of slim; you can safely ignore this.)

To verify that this has worked, execute the following commands; it should run without raising any errors.

cd $HOME/workspace/models/slim python -c "from nets import cifarnet; mynet = cifarnet.cifarnet"

YunkaiXiao commented 7 years ago

that's correct, you cd into your the space you work (dir), this doesn't have to be named "workspace" though. then touch to create WORKSPACE (file). Notice the difference of workspace and WORKSPACE and you're good.

MotorCityCobra commented 7 years ago

You've been unhelpful Where are you? I'm in South Carolina.

YunkaiXiao commented 7 years ago

Ah.... North Carolina, why? Does this not work? I did touch WORKSPACE and it works?

MotorCityCobra commented 7 years ago

Just curious if you were near North Korea. Funny you're next door. What are you using Tensorflow for? I'm going to see if it can learn my taste in photos.

It worked. I entered 'export TF_CPP_MIN_LOG_LEVEL=2' in terminal and it got rid of that warning ...

W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.

YunkaiXiao commented 7 years ago

I think what this actually does is suppressing warning msgs based on mrry:

I'm using it on language processing, tried numerous things and tensor has been the best documented one.

MotorCityCobra commented 7 years ago

That makes more sense. I'm getting that above warning, which was put there by Tensorflow but there is absolutely nothing I've found to be done about it scribbled anywhere by the Tensorflow people so I'll have to run an unnecessarily slow version unless I want to buy a Titan X.

It's off topic of this thread anyways but all I found on StackOverflow was this. It didn't work.

bazel build --linkopt='-lrt' -c opt --copt=-mavx --copt=-msse4.2 --copt=-msse4.1 --copt=-msse3-k //tensorflow/tools/pip_package:build_pip_package

aditya478492 commented 6 years ago

workspace file will be in the package which you are about to build. change path to that package and run. ex: tensorflow package folder contains a workspace file

joybit commented 5 years ago

All you need to solve this is to run the command from /tensorflow folder

zaidtahirbutt commented 4 years ago

@joybit thanks a lot!! That was such a freakin simple solution!! I was looking at all these complex solutions! .. Btw why is it must to go in the tensorflow folder to run Bazel? I didn't specifically install Bazel in that folder, but I did build my tensorflow package in that folder using Bazel.