Distributed tensorflow fails with "BUILD file not found on package" - tensorflow

When attempting to build in the core/distributed_runtime module using:
$ bazel build -c opt
//tensorflow/core/distributed_runtime/rpc:grpc_tensorflow_server
We get the following error:
ERROR: error loading package 'tensorflow/core/distributed_runtime/rpc':
Extension file not found. Unable to load package for
'//google/protobuf:protobuf.bzl': BUILD file not found on package path.
INFO: Elapsed time: 0.097s
Are there additional steps required (and not mentioned in the README.md) ?

This sounds like a git submodule issue—and it would affect building any part of TensorFlow from source. To recover, run the following command in your git repository:
$ git submodule update --init --recursive
(There are many other ways to do the same thing: see this question for some suggestions.)

Related

how to install tensorflow serving offline

My server is in my company network which disconnected to the internet. I can only downloads the required files in other office computer and upload them.
I git clone
git clone --recurse-submodules https://github.com/tensorflow/serving
cd serving
cd tensorflow
./configure cd ..
Configuration is ok as the default advices.
But when I want to bazel the repository.
[root#centos7 /data/mig_predictor/pre_installation/serving]# bazel build -c opt ... --package_path /data/mig_predictor/pre_installation .........
```
ERROR: error loading package 'serving/tensorflow/tensorflow/tools/pip_package': Extension file not found. Unable to load package for '//tensorflow/core:platform/default/build_config_root.bzl': BUILD file not found on package path. ERROR: error loading package 'serving/tensorflow/tensorflow/tools/pip_package': Extension file not found. Unable to load package for '//tensorflow/core:platform/default/build_config_root.bzl': BUILD file not found on package path. INFO: Elapsed time: 0.481s
How can I pointed the local repository for the predownloaded packages?
Thank you!

How to Clone Repository using GitPython

I am new to Python and Git. Found GitPython library to run Git commands using Python. I am trying to clone an already created private repository on Google Cloud to my local directory on Mac. My code is as follow:
repo = Repo.clone_from('https://source.developers.google.com/p/my-project/r/my-project--data', 'my-local-dir', no_checkout=True)
And I am getting following error:
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128) cmdline: git clone --no-checkout -v https://source.developers.google.com/p/my-project/r/my-project-data /my-local-dir stderr: 'Cloning into '/my-local-dir'... fatal: could not read Username for 'https://source.developers.google.com': Device not configured
Please help.
Thanks in advance.
I was trying to the same thing, then I discoverd pygit2, and with it I was able to clone a repository using two lines.
How? First make sure you have installed pygit2 in your python environment. I did that using the following command line:
pip install pygit2
Here the two lines I mentioned above:
import pygit2
pygit2.clone_repository("https://github.com/libgit2/pygit2", "pygit2")

Getting started with realm ReactExample - Error no such file GCDWebServerRequest.m?

I ran across realm when researching options for an embedded database to use for my first react-native app.
Following the steps documented here:
https://realm.io/docs/react-native/latest/#examples
I entered the following commands:
git clone https://github.com/realm/realm-js.git
cd realm-js/examples/ReactExample
npm install
When I open ReactExample.xcodeproj and attempt to build:
clang: error: no such file or directory: '/Users/edward3/Documents/projects/react-native/realm/realm-js/vendor/GCDWebServer/GCDWebServer/Core/GCDWebServerRequest.m'
clang: error: no input files
What am I missing?
Never mind, I was missing git submodule update.
git clone https://github.com/realm/realm-js.git
git submodule update --init --recursive
cd realm-js/examples/ReactExample
npm install
I am excited about learning to use realm. The realm example, at first glance, seems simple to learn compared to react-native sqlite examples.
https://realm.io/news/introducing-realm-react-native/

To install matplotlib from source, what is the source tree

I am trying to use the module "plot_trisurf()" in matplotlib. My python compile gives an error that axes3D does not contain the module. I want to install the latest version of matplotlib.
I would like to use the steps provided here: http://matplotlib.org/faq/installing_faq.html
In source install, step 2 is "delete the build directory in source tree". What is the source tree and where do i find the right build directory to delete?
Any suggestions are appreciated. Thank you for your time.
The source tree is under what ever directory you clone the git repo into or unpack the tarball into. It will contain a whole bunch (~30) of folders and files including lib, CXX, and INSTALL. If you have previously built matplotlib there will be a folder build where the results of the build are stored, if you have not yet run your first build it will not exist.
If you have cloned the git repo the following:
git clean -f -d -x
will remove any untracked files for you.

Hadoop MapReduce 1.0.2 eclipse-plugin build fails...I don't get it

I have tried to build the Hadoop MapReduce eclipse-plugin from source, but get the following error.
SRC_BASE_DIR/hadoop-common/hadoop-mapreduce-project/build/ivy/lib/Hadoop/common
does not exist.
I cloned the Hadoop source from the Apache GIT repo and managed to build the actual Hadoop binaries using the following commands
cd SRC_BASE_DIR/hadoop-common
mvn clean install
This was successful so next I changed directory
cd SRC_BASE_DIR/hadoop-common/hadoop-mapreduce-project/src/contrib/eclipse-plugin
I appended eclipse.home property to the build.properties file...
echo "eclipse.home=/opt/eclipse" >> build.properties
then tried to build the plugin...
ant jar
But I still get the error outlined above.
What am I missing?
OK I was missing a step.
In the folder
SRC_BASE_DIR/hadoop-common/hadoop-mapreduce-project
I ran the following command
mvn -DskipTests install
which was successful. Then in folder
SRC_BASE_DIR/hadoop-common/hadoop-mapreduce-project/src/contrib/eclipse-plugin
I ran the command
ant jar
and this time it was succesful and created the JAR file hadoop-1.0.2-eclipse-plugin.jar
Now, I just hope that that the plugin works!