Reputation: 1565
I'm following the instruction here to build user written op library. But my tensorflow is installed with anaconda. On a step I should run the following command in terminal:
$ bazel build -c opt //tensorflow/core/user_ops:zero_out.so
But I got:
The 'build' command is only supported from within a workspace.
Tensorflow was installed by cloning it from the repository. So where is the workspace??
Upvotes: 1
Views: 1793
Reputation: 424
A simple solution is to run touch WORKSPACE
in the directory you are running the build
command.
Bazel looks for an empty file named WORKSPACE
in your workspace. You can also set the environment variable $WORKSPACE
to another path if you don't want to use your current working directory.
There is a little more info here: https://bazel.build/versions/master/docs/tutorial/workspace.html
Upvotes: 2