@@ -24,6 +24,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
2424
2525tf_configure (name = "local_config_tf" )
2626
27+ # boost is required for @thrift
2728git_repository (
2829 name = "com_github_nelhage_rules_boost" ,
2930 commit = "9f9fb8b2f0213989247c9d5c0e814a8451d18d7f" ,
@@ -34,56 +35,25 @@ git_repository(
3435load ("@com_github_nelhage_rules_boost//:boost/boost.bzl" , "boost_deps" )
3536boost_deps ()
3637
37- http_archive (
38- name = "com_github_google_flatbuffers" ,
39- sha256 = "12a13686cab7ffaf8ea01711b8f55e1dbd3bf059b7c46a25fefa1250bdd9dd23" ,
40- strip_prefix = "flatbuffers-b99332efd732e6faf60bb7ce1ce5902ed65d5ba3" ,
41- urls = [
42- "https://mirror.bazel.build/github.com/google/flatbuffers/archive/b99332efd732e6faf60bb7ce1ce5902ed65d5ba3.tar.gz" ,
43- "https://github.com/google/flatbuffers/archive/b99332efd732e6faf60bb7ce1ce5902ed65d5ba3.tar.gz" ,
44- ],
45- )
46-
47- # LINT.IfChange(thrift_archive_version)
48- http_archive (
49- name = "thrift" ,
50- build_file = "//third_party:thrift.BUILD" ,
51- sha256 = "b7452d1873c6c43a580d2b4ae38cfaf8fa098ee6dc2925bae98dce0c010b1366" ,
52- strip_prefix = "thrift-0.12.0" ,
53- urls = [
54- "https://github.com/apache/thrift/archive/0.12.0.tar.gz" ,
55- ],
56- )
57- # LINT.ThenChange(third_party/thrift.BUILD:thrift_gen_version)
58-
59- # LINT.IfChange(arrow_archive_version)
60- http_archive (
61- name = "arrow" ,
62- build_file = "//third_party:arrow.BUILD" ,
63- sha256 = "d7b3838758a365c8c47d55ab0df1006a70db951c6964440ba354f81f518b8d8d" ,
64- strip_prefix = "arrow-apache-arrow-0.16.0" ,
65- urls = [
66- "https://github.com/apache/arrow/archive/apache-arrow-0.16.0.tar.gz" ,
67- ],
68- )
69- # LINT.ThenChange(third_party/arrow.BUILD:parquet_gen_version)
70-
71- # https://github.com/protocolbuffers/protobuf/tree/v3.8.0
72- PROTOBUF_COMMIT = "09745575a923640154bcf307fba8aedff47f240a"
73-
74- # This is needed by the version of tensorflow metadata we depend on.
75- # TODO(andylou): remove this once com_github_tensorflow_metadata is updated.
76- git_repository (
77- name = "protobuf_archive" ,
78- commit = PROTOBUF_COMMIT ,
79- remote = "https://github.com/google/protobuf.git" ,
80- shallow_since = "1558721209 -0700" ,
81- )
8238
8339#####################################################################################
8440
85- _TENSORFLOW_GIT_COMMIT = "b36436b087bd8e8701ef51718179037cccdfc26e" # 2.3.0
86- _TENSORFLOW_ARCHIVE_SHA256 = "a474d4328524de1951655cd6afb4888d256c37a0b4a47e6c623b353ab382b39f"
41+ # ===== TensorFlow dependency =====
42+ #
43+ # TensorFlow is imported here instead of in tf_serving_workspace() because
44+ # existing automation scripts that bump the TF commit hash expect it here.
45+ #
46+ # To update TensorFlow to a new revision.
47+ # 1. Update the 'git_commit' args below to include the new git hash.
48+ # 2. Get the sha256 hash of the archive with a command such as...
49+ # curl -L https://github.com/tensorflow/tensorflow/archive/<git hash>.tar.gz | sha256sum
50+ # and update the 'sha256' arg with the result.
51+ # 3. Request the new archive to be mirrored on mirror.bazel.build for more
52+ # reliable downloads.
53+
54+ # TODO(b/178125783): update this commit when TF 2.5 is released.
55+ _TENSORFLOW_GIT_COMMIT = "d2460be38bd655520dd16a0a64096e0161d52331" # 1/15/2021 commit
56+ _TENSORFLOW_ARCHIVE_SHA256 = "80aa4e312b3e98403098ee051834eb481158bdfd05d9c9de0195d6540ab63e78"
8757
8858http_archive (
8959 name = "org_tensorflow" ,
@@ -95,29 +65,24 @@ http_archive(
9565 strip_prefix = "tensorflow-%s" % _TENSORFLOW_GIT_COMMIT ,
9666)
9767
98- # START: Upstream TensorFlow dependencies
99- # TensorFlow build depends on these dependencies.
100- # Needs to be in-sync with TensorFlow sources.
101- http_archive (
102- name = "io_bazel_rules_closure" ,
103- sha256 = "5b00383d08dd71f28503736db0500b6fb4dda47489ff5fc6bed42557c07c6ba9" ,
104- strip_prefix = "rules_closure-308b05b2419edb5c8ee0471b67a40403df940149" ,
105- urls = [
106- "https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/rules_closure/archive/308b05b2419edb5c8ee0471b67a40403df940149.tar.gz" ,
107- "https://github.com/bazelbuild/rules_closure/archive/308b05b2419edb5c8ee0471b67a40403df940149.tar.gz" , # 2019-06-13
108- ],
109- )
110- # END: Upstream TensorFlow dependencies
111-
112- # Please add all new TensorFlow struct2tensor dependencies in workspace.bzl.
68+ # Please add all new struct2tensor dependencies in workspace.bzl.
11369load ("//struct2tensor:workspace.bzl" , "struct2tensor_workspace" )
11470struct2tensor_workspace ()
11571
116- load ("@com_google_protobuf//:protobuf_deps.bzl" , "protobuf_deps" )
117- protobuf_deps ()
72+ # Initialize TensorFlow's external dependencies.
73+ load ("@org_tensorflow//tensorflow:workspace3.bzl" , "workspace" )
74+ workspace ()
75+ load ("@org_tensorflow//tensorflow:workspace2.bzl" , "workspace" ) # buildozer: disable=load
76+ workspace ()
77+ load ("@org_tensorflow//tensorflow:workspace1.bzl" , "workspace" ) # buildozer: disable=load
78+ workspace ()
79+ load ("@org_tensorflow//tensorflow:workspace0.bzl" , "workspace" ) # buildozer: disable=load
80+ workspace ()
81+
82+ # Initialize bazel package rules' external dependencies.
83+ load ("@rules_pkg//:deps.bzl" , "rules_pkg_dependencies" )
84+ rules_pkg_dependencies ()
11885
11986# Specify the minimum required bazel version.
12087load ("@org_tensorflow//tensorflow:version_check.bzl" , "check_bazel_version_at_least" )
121-
12288check_bazel_version_at_least ("2.0.0" )
123-
0 commit comments