-
Notifications
You must be signed in to change notification settings - Fork 626
/
Copy pathWORKSPACE
215 lines (185 loc) · 7.68 KB
/
WORKSPACE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
workspace(name = "waymo_open_dataset_rules")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_proto",
sha256 = "dc3fb206a2cb3441b485eb1e423165b231235a1ea9b031b4433cf7bc1fa460dd",
strip_prefix = "rules_proto-5.3.0-21.7",
urls = [
"https://github.com/bazelbuild/rules_proto/archive/refs/tags/5.3.0-21.7.tar.gz",
],
)
http_archive(
name = "rules_python",
sha256 = "9d04041ac92a0985e344235f5d946f71ac543f1b1565f2cdbc9a2aaee8adf55b",
strip_prefix = "rules_python-0.26.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.26.0/rules_python-0.26.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
http_archive(
name = "rules_cc",
urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz"],
sha256 = "2037875b9a4456dce4a79d112a8ae885bbc4aad968e6587dca6e64f3a0900cdf",
strip_prefix = "rules_cc-0.0.9",
)
http_archive(
name = "rules_license",
sha256 = "6157e1e68378532d0241ecd15d3c45f6e5cfd98fc10846045509fb2a7cc9e381",
urls = [
"https://github.com/bazelbuild/rules_license/releases/download/0.0.4/rules_license-0.0.4.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/rules_license/releases/download/0.0.4/rules_license-0.0.4.tar.gz",
],
)
http_archive(
name = "com_google_googletest",
sha256 = "ff7a82736e158c077e76188232eac77913a15dac0b22508c390ab3f88e6d6d86",
strip_prefix = "googletest-b6cd405286ed8635ece71c72f118e659f4ade3fb",
urls = [
"http://mirror.tensorflow.org/github.com/google/googletest/archive/b6cd405286ed8635ece71c72f118e659f4ade3fb.zip",
"https://github.com/google/googletest/archive/b6cd405286ed8635ece71c72f118e659f4ade3fb.zip",
],
)
http_archive(
name = "com_github_gflags_gflags",
sha256 = "ae27cdbcd6a2f935baa78e4f21f675649271634c092b1be01469440495609d0e",
strip_prefix = "gflags-2.2.1",
urls = [
"http://mirror.tensorflow.org/github.com/gflags/gflags/archive/v2.2.1.tar.gz",
"https://github.com/gflags/gflags/archive/v2.2.1.tar.gz",
],
)
http_archive(
name = "com_google_glog",
build_file = "//waymo_open_dataset:bazel/glog.BUILD",
sha256 = "375106b5976231b92e66879c1a92ce062923b9ae573c42b56ba28b112ee4cc11",
strip_prefix = "glog-0.7.0",
urls = [
"https://github.com/google/glog/archive/refs/tags/v0.7.0.tar.gz",
],
)
http_archive(
name = "boringssl",
sha256 = "542dd328952cea08785b58990b12e0832c49123807c8854e136136830c8b115c",
strip_prefix = "boringssl-da7997d97fa17f22cc3eb9c681c8494af7a98eef",
urls = [
"http://mirror.tensorflow.org/github.com/google/boringssl/archive/da7997d97fa17f22cc3eb9c681c8494af7a98eef.tar.gz",
"https://github.com/google/boringssl/archive/da7997d97fa17f22cc3eb9c681c8494af7a98eef.tar.gz",
],
)
http_archive(
name = "com_google_absl",
sha256 = "94aef187f688665dc299d09286bfa0d22c4ecb86a80b156dff6aabadc5a5c26d",
strip_prefix = "abseil-cpp-273292d1cfc0a94a65082ee350509af1d113344d",
urls = [
"https://github.com/abseil/abseil-cpp/archive/273292d1cfc0a94a65082ee350509af1d113344d.tar.gz"
],
)
http_archive(
name = "zlib",
build_file = "//waymo_open_dataset:bazel/zlib.BUILD",
sha256 = "91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9",
strip_prefix = "zlib-1.2.12",
urls = [
"http://mirror.tensorflow.org/zlib.net/zlib-1.2.12.tar.gz",
"https://zlib.net/zlib-1.2.12.tar.gz",
],
)
http_archive(
name = "six_archive",
build_file = "//waymo_open_dataset:bazel/six.BUILD",
sha256 = "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259",
strip_prefix = "six-1.15.0",
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/pypi.python.org/packages/source/s/six/six-1.15.0.tar.gz",
"https://pypi.python.org/packages/source/s/six/six-1.15.0.tar.gz",
],
)
bind(
name = "six",
actual = "@six_archive//:six",
)
http_archive(
name = "bazel_skylib",
sha256 = "b8a1527901774180afc798aeb28c4634bdccf19c4d98e7bdd1ce79d1fe9aaad7",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz",
],
)
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()
http_archive(
name = "com_google_protobuf",
sha256 = "f66073dee0bc159157b0bd7f502d7d1ee0bc76b3c1eac9836927511bdc4b3fc1",
strip_prefix = "protobuf-3.21.9",
urls = [
"https://github.com/protocolbuffers/protobuf/archive/v3.21.9.zip",
],
)
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
http_archive(
name = "deeplab2",
build_file = "//waymo_open_dataset:bazel/deeplab2.BUILD",
sha256 = "d5ce468a0ddb40cc7b22c71a82c26b506c95d55905a1c44ce1c87208f3a76b61",
strip_prefix = "deeplab2-17c7ff3cadf4ee56b27b1cb73f1e15b69c5bd8a9",
urls = [
"https://github.com/google-research/deeplab2/archive/17c7ff3cadf4ee56b27b1cb73f1e15b69c5bd8a9.zip",
],
)
http_archive(
name = "tflite_micro",
sha256 = "d6aba330e299f1add8efc6b2bb53806fac82afb84a4f48f7bbe154e087adbe50",
strip_prefix = "tflite-micro-380a6c125c4d699fa3f434e1429802ee825e739d",
urls = [
"https://github.com/tensorflow/tflite-micro/archive/380a6c125c4d699fa3f434e1429802ee825e739d.zip",
],
)
# We TensorFlow from the pip package via pip_parse belo, this repo is only
# needed for bzl scripts (ex. tf_gen_op_wrapper_py), which are not in the pip
# package.
http_archive(
name = "org_tensorflow",
sha256 = "af0584df1a4e28763c32c218b39f8c4f3784fabb6a8859b00c02d743864dc191",
strip_prefix = "tensorflow-2.12.0",
urls = ["https://github.com/tensorflow/tensorflow/archive/v2.12.0.zip"],
)
###########################################
# Custom configuration of the workspace.
###########################################
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
py_repositories()
python_register_toolchains(
name = "python3_10",
python_version = "3.10",
# Bazel's rules_python marks the python installation's lib directory as
# read-only. This prevents python interpretor from generating .pyc files.
# rules_python intend for that behavior because the content of .pyc files
# are platform dependent. If .pyc files were included in a bazel action
# inputs, then there would be erroneous cache misses. The problem is that
# in linux docker containers root users can still write to read-only
# directories, resulting in .pyc files, resulting in erroneous cache misses.
# By default rules_python errors when running as a root user because people
# don't want cache misses. But Colab runs as the root user. So we need to
# overide the check preventing root user. See
# https://github.com/bazelbuild/rules_python/pull/713 for more details on
# the root problem and this work around.
ignore_root_user_error = True,
)
load("@python3_10//:defs.bzl", "interpreter")
load("@rules_python//python:pip.bzl", "pip_parse")
pip_parse(
name = "wod_deps",
python_interpreter_target = interpreter,
quiet = False,
requirements_lock = "//waymo_open_dataset:requirements.txt",
)
load("@wod_deps//:requirements.bzl", "install_deps", "requirement")
install_deps()
load("@tflite_micro//python:py_pkg_cc_deps.bzl", "py_pkg_cc_deps")
py_pkg_cc_deps(
name = "tensorflow_cc_deps",
includes = ["tensorflow/include"],
libs = ["tensorflow/libtensorflow_framework.so.2"],
pkg = requirement("tensorflow"),
)