-
Notifications
You must be signed in to change notification settings - Fork 4k
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
tensorflow building issue on ubuntu 14.04: Accessing remote repository through a proxy #587
Comments
Wow, do you have special network configuration? It seems like it cannot fetch remote dependencies. @kchodorow @davidzchen might have more idea on the problem source. |
@damienmg Thank you for reply. Yes it seems to be network problem. My working machine is behind a proxy but I think I have correct setting to pass it. At least I could manually wget the jpeg library without problem. I'll check with each of the libraries mentioned in the error message when I have access to the machine tomorrow, but I think there won't be much problem by manual wget. Does Bazel need special setting for proxy? |
Oops assigning to Kristina then |
FYI, I'm having the same issue behind a proxy set as
|
Unfortunately, there is no support at the moment for fetching external resources through a proxy. It looks like we'd want to add a mechanism to specify local settings, which I don't think Bazel has at the moment. |
Just confirmed I can git clone and wget those resources without problem, but fails with Bazel. Are there any work around to let Bazel use the system's proxy setting? |
No (although we should add that!), but you should be able to change your WORKSPACE file to local_repository() or new_local_repository() once they're downloaded to your local machine (see http://bazel.io/docs/be/workspace.html#local_repository, http://bazel.io/docs/be/workspace.html#new_local_repository). |
Got it. Thank you for the information. So the current best practice would be:
|
Does java.net.URL use the proxy settings? |
Java seems to support HTTP(S) proxies transparently: https://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html We should make sure that our fetching code works with them (I haven't tried whether it does) and optionally on server start-up check whether these variables are empty, but the usual environment variables are set (HTTP_PROXY, HTTPS_PROXY) and then set the Java properties correctly from that. |
Hi, $ bazel build -c opt //tensorflow/cc:tutorials_example_trainer
|
met the same problem as @srsaharoy ... |
If I change the 'genrule' parameters in png.BUILD and jpeg.BUILD to specifically include "." as follows from:genrule( ["*/"],to:genrule( ["/."],then the build no longer fails with error "cycle in dependency graph" However, now it fails because it can't find a source file (which does exist!) in either libpng-1.2.53 or jpeg-9a directory path. New error message is below which says that it could not find "libpng-1.2.53/pngpread.c". I also do not understand how or who is $ bazel build -c opt //tensorflow/cc:tutorials_example_trainer |
sorry, somehow made a typo while posting: |
I tried the 'read error -> download lib -> set local repository' loop. |
could anyone who succeeded to overcome this problem post their changes to the WORKSPACE file? |
See issue #623 srsaharoy posted a WORKSPACE file (which only trouble is the circular dependencies and the fix is in the bug report). We should probably provide a WORKSPACE + shell script to work around that bug. |
Thanks. I added a summary of the fix to that issue (#623 (comment)). |
Note, the posted WORKSPACE file only gets you past building the tensorflow tutorials_example_trainer. If you want to rebuild the whole package and install, for example to create a new TensorFlow user operator, there are no less than 74 external dependencies to manually download and edit in your WORKSPACE file...(mostly needed for TensorBoard). This is not very workable for those of us trying to build TensorFlow from behind a corporate firewall. |
Hi @sunil3590 I really like your idea, and created a repo, with a script to facilitate slightly https://github.com/hughperkins/tf_cached_build |
Do you know that you could simply does a `bazel fetch
--experimental_repository_cache /path/to/cache //...` and then ship the
`/path/to/cache` directory and `bazel build --experimental_repository_cache
/path/to/cache //...` would use that cache?
…On Sun, May 28, 2017 at 8:17 AM Hugh Perkins ***@***.***> wrote:
Hi @sunil3590 <https://github.com/sunil3590> I really like your idea, and
created a repo, with a script to facilitate slightly
https://github.com/hughperkins/tf_cached_build
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#587 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADjHf8P5rSFL3dK5-dfjfZkXevDLyiYhks5r-ZAlgaJpZM4GgBZt>
.
|
@damienmg I did not. Extremely useful information :-) |
:)
…On Sun, May 28, 2017 at 8:36 AM Hugh Perkins ***@***.***> wrote:
@damienmg <https://github.com/damienmg> I did not. Extremely useful
information :-)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#587 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADjHf3oSdH1P-J4O5djngZK5YwGA_L1tks5r-ZSHgaJpZM4GgBZt>
.
|
By the way, @damienmg what version is required for this fuctionality to work? |
Hi @damienmg I tried upgrading to bazel 0.5.0, but doesnt seem to work for me for tensorflow? (basically what I did was:
|
Can you give the reproduction steps?
…On Tue, May 30, 2017 at 12:50 AM Hugh Perkins ***@***.***> wrote:
Hi @damienmg <https://github.com/damienmg> I tried upgrading to bazel
0.5.0, but doesnt seem to work for me for tensorflow?
[image: screen shot 2017-05-30 at 8 48 17 am]
<https://cloud.githubusercontent.com/assets/123560/26573285/0909ea7e-4515-11e7-8f86-44d0a02d5fa5.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#587 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADjHf_SB-OuA9xTCbsU0LorzaSSpVNgFks5r-8pegaJpZM4GgBZt>
.
|
I need this to build tensor flow for the native_client in mozilla's DeepSpeech project. I am behind an authorized proxy, where I need a "domain\user:password@my.proxy.com:9090" as my proxy Even after using (where my $http_host, $https_host, and $prox_port are correct): I still cannot get past the error: Does Auth support domain as well in user name? |
@mcelhennyi I had the same issue as yours. |
@sunil3590 I tried your method on a CentOS 6 cluster but it isn't working. I downloaded the file on my login node of cluster and created a http server. I tested the server using wget and it is workiing fine. But when I provide the same url to bazel, it cannot download the file. |
Just report that I don't have this issue. |
I got this working on CentOS, you need to unset ssh -f -N -n -L9999:localhost:9999 host_running_proxy
unset https_proxy
unset http_proxy
export HTTPS_PROXY=http://locahost:9999
export HTTP_PROXY=http://localhost:9999 |
Hi everyone, I tried all the options above to try my problem get going, but I'm unable to make it work. I'm using windows 10 on an Azure Deep Learning DSVM, probably the latest build. I'm trying to build the summarize_graph tool using tensorflow's bazel commands.
I'm getting the following error : I'm using Bazel Version "0.15.0". I tried removing the proxy setting too both using cmd and manually in settings, but that seemed not to work. Could anyone please help me with this ? Please let me know if you need any more information. |
@JonnoFTW That works. Expect that I didn't any proxy server
|
I have this issue as well and its really starting to get annoying. It seems that Tensorflow serve with gpu support can only be built with this Bazel thing and the problems existed for 3 years without a solution... They really couldn't have built it some other way : ( , spent my entire day on this. |
ok so i've finally managed to find a hacky way around this. I'm behind the great firewall of chinois, my vpn doesn't really work anymore and basically my connection keeps getting cut off when ever its trying to fetch something as part of the build process and I have to start again everytime, might be a different problem for those behind a corporate firewall. basically i run echo build --experimental_repository_cache and then instead of running bazel build I run bazel fetch on the target which sort of prefetches it and caches it so you just keep doing that and cursing under your breath until most of the the packages are fetched, and then you run bazel build and hopefully it works. I'm not actually sure if you need to run echo build --experimental_repository_cache just posting in case it could save someone else the frustration. hhrrrRUAAGHH |
Does bazel have a mirror or something one can use to download the dependencies from? I had such a bad experience with this last time and I have to do it again tomorrow and it's bringing up some ptsd |
As (tensorflow/tensorflow#67) is declared as Bazel issue I'm writing here. So I'm having the same issue with the original post. As mentioned in the original post, by manually wget and placing the jpeg library the error message about jpeg has gone. However there are still many error messages, and by trying multiple times the error message seems to change but always fails with downloading something. These are the variations.
Variation 1:
ERROR: /home/name/work/tensorflow/tensorflow/core/platform/default/build_config/BUILD:36:1: no such package '@re2//': https://github.com/google/re2.git: cannot open git-upload-pack and referenced by '//tensorflow/core/platform/default/build_config:platformlib'.
Variation 2:
ERROR: /home/name/work/tensorflow/tensorflow/core/platform/default/build_config/BUILD:36:1: no such package '@png_archive//': Error downloading from https://storage.googleapis.com/libpng-public-archive/libpng-1.2.53.tar.gz to /home/name/.cache/bazel/_bazel_name/894ee6ce07893c5c665fe600d592867f/external/png_archive: Error downloading https://storage.googleapis.com/libpng-public-archive/libpng-1.2.53.tar.gz to /home/name/.cache/bazel/_bazel_name/894ee6ce07893c5c665fe600d592867f/external/png_archive/libpng-1.2.53.tar.gz: storage.googleapis.com and referenced by '//tensorflow/core/platform/default/build_config:platformlib'.
Variation 3:
ERROR: /home/name/work/tensorflow/tensorflow/tensorflow.bzl:224:3: no such package '@gemmlowp//': https://github.com/google/gemmlowp.git: cannot open git-upload-pack and referenced by '//tensorflow/core:kernels'.
The text was updated successfully, but these errors were encountered: