ritchieng/dlami

Bazel broke when trying bazel build (...) image-retraining

Closed this issue · 4 comments

Hello Ritchie,

I use your AMI (Ireland zone) with TensorFlow.When I try image-retraining (https://www.tensorflow.org/tutorials/image_retraining) and especially bazel build tensorflow/examples/image_retraining:retrain
I got an error:

ubuntu@ip-XXX-XX-XX-XX:~/tensorflow$ bazel build tensorflow/examples/image_retraining:retrain
ERROR: /home/ubuntu/tensorflow/tensorflow/core/BUILD:1017:1: no such package '@zlib_archive//': Error downloading [http://zlib.net/zlib-1.2.8.tar.gz] to /home/ubuntu/.cache/bazel/_bazel_ubuntu/ad1e09741bb4109fbc70ef8216b59ee2/external/zlib_archive/zlib-1.2.8.tar.gz: GET returned 404 Not Found and referenced by '//tensorflow/core:lib_internal'.
ERROR: Analysis of target '//tensorflow/examples/image_retraining:retrain' failed; build aborted.
INFO: Elapsed time: 6.759s

Just to let you know. I haven't found a solution for the moment

Regards, mph

@mphuget @ritchieng This is how I resolved mine.
The problem is that http://zlib.net/zlib-1.2.8.tar.gz no longer exist at http://zlib.net.
So I had to manually add the correct link in the workspace.bzl

$ cd tensorflow
$ vi tensorflow/workspace.bzl

change the section on zlib_archive to

native.new_http_archive(
   name = "zlib_archive",
   url = "http://zlib.net/zlib-1.2.11.tar.gz",
   sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1",
   strip_prefix = "zlib-1.2.11",
   build_file = str(Label("//:zlib.BUILD")),
 )

This corresponds to the current release that is publicly available.
Let me know of any other challenge you faced :)

Thanks Innocent, apparently, that fixed the problem. I tried to upgrade TF as proposed on the Internet but without success.

Thanks @mphuget for raising this issue and @Innarticles for posting a fix. I'll keep this in mind by testing for it when I'm building future versions of TFAMI.