-
Notifications
You must be signed in to change notification settings - Fork 74k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: provide a means to configure, build, and install that includes cc #15290
Comments
Have you followed this page: I agree that ultimate installation instructions are for python pip packages. That may be confusing. But once you have the source directory, you should be able to build anything. @asimshankar do we have a document to describe |
Yes, I have gone through all of the steps to build and install the python components into In my search for the best way to do this, the best resource I have found is on stackoverflow: That question is two years old(!!) and none of the answers are (IMHO) satisfactory. The answer that comes closest is this one. But the steps as shown there did not work for me, possibly due to changes to tensorflow between the time the answer was written and the current r1.4 release. I have been able modify the steps to make something that does work, but it is really unacceptable for the Tensorflow team to expect every developer to discover on their own how to do this. There really should be something like the standard unix recipe:
The result from the above steps would be the installation of a directory at the default path Let me be clear: I personally am not blocked, as I now have a working configuration on both my Mac and Linux development machines. But other developers (and me sometime in the future) will need to do this, and it seems bizarre that the Tensorflow team does not have a documented and easy to follow process that all developers who need C++ development can follow, and will continue to work with each new tensorflow release. I could document what I do, possibly on the above stackoverflow thread, but the Tensorflow community is not served well by that hack. |
It has been 14 days with no activity and this issue has an assignee.Please update the label and/or status accordingly. |
Nagging Assignee: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly. |
1 similar comment
Nagging Assignee: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly. |
I'm curious if there has been any progress on this issue. I'm currently working on making a Docker image to deploy to Google Cloud and I've discovered that I am once again blocked by this issue. If I pull one of the docker images, I find that libtensorflow_cc.so is not included anywhere in the image. What is worse, when I try to build it (with gpu support) I get errors, similar to this issue: #2143 I tried both This error seems to indicate that |
@asimshankar @allenl to comment. |
The pip package only includes |
|
Nagging Assignee @gunan: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly. |
1 similar comment
Nagging Assignee @gunan: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly. |
"you should be able to build anything" I agree, I should be. I can't find any documentation at all on how to build and user TensorFlow as a C and C++ library, or much about what all can be built with the Bazel builder at all. I'm sure some of that is me not being good with Bazel, but that can't be the only thing getting in the way here. Note that https://www.tensorflow.org/install/install_sources explicitly talks about how to build the pip packages, not how to build for C++. |
@asimshankar Do we have documentation for libtensorflow? |
Nagging Assignee @gunan: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly. |
Can @asimshankar please reply to this thread? |
The C library package (consisting essentially of a single header file and a few shared libraries) can be built using the process we use for building release binaries. (See README and StackOverflow answer). For the C++ library, we haven't had the bandwidth to support that ourselves yet and have relied on community support for that (see #2412 (comment) and #2412 (comment) and #2412 (comment) - credit to @FloopCZ and others). If someone would like to contribute a packaging rule for the C++ library by adding a BUILD target similar to |
Please remove the assignee, as this issue is inviting external contributions. Otherwise, remove the |
Propose that this project should be part of the official tensorflow docker images: https://github.com/FloopCZ/tensorflow_cc Building and using libtensorflow_cc.so from source is non-trivial and burns dev time. Would be good for community if the official images support easy c++ dev and integration. Thanks. |
This issue is stale because it has been open for 180 days with no activity. It will be closed if no further activity occurs. Thank you. |
This issue was closed because it has been inactive for 1 year. |
Please go to Stack Overflow for help and support:
https://stackoverflow.com/questions/tagged/tensorflow
If you open a GitHub issue, here is our policy:
Here's why we have that policy: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.
System information
You can collect some of this information using our environment capture script:
https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh
You can obtain the TensorFlow version with
python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
Describe the problem
Describe the problem clearly here. Be sure to convey here why it's a bug in TensorFlow or a feature request.
Tensorflow doesn't seem to have a clean way to install from sources to support both python and C++ development. When we install from sources, only the core tensorflow framework is installed in the python site-packages directory. The
cc
headers (and maybe others) are not included. Likewise thelibtensorflow_cc.so
is not built. It's surprising that there is so little documentation for how C++ developers are expected to develop tensorflow applications. My use case is probably common: I want to train and test my model using python, but I want to deploy an application that does prediction/inference with the app written in C++.I have managed once to successfully install the headers and libraries I need into
/usr/local/...
on a Mac, but in doing so I lost some of the CPU optimizations that I had specified when doing the standard build from sources. Now I need to repeat this process on Linux, where I need GPU support, and want to make sure I get it right.It would be so nice if there was something close to the standard
./configure; make; make install
that could install headers and libraries into a chosen directory.Source code / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.
The text was updated successfully, but these errors were encountered: