forked from openvinotoolkit/model_server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWORKSPACE
222 lines (185 loc) · 7.17 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
216
217
218
219
220
221
222
#
# Copyright (c) 2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
workspace(name = "ovms")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Tensorflow serving
git_repository(
name = "tensorflow_serving",
remote = "https://github.com/tensorflow/serving.git",
tag = "2.2.2",
patch_args = ["-p1"],
patches = ["net_http.patch", "listen.patch"]
# ^^^^^^^^^^^^
# make bind address configurable
)
# Tensorflow core
git_repository(
name = "org_tensorflow",
remote = "https://github.com/tensorflow/tensorflow.git",
tag = "v2.2.2",
patch_args = ["-p1"],
patches = ["tf.patch"]
)
http_archive(
name = "rules_pkg",
sha256 = "5bdc04987af79bd27bc5b00fe30f59a858f77ffa0bd2d8143d5b31ad8b1bd71c",
url = "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.0/rules_pkg-0.2.0.tar.gz",
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
load(
"@org_tensorflow//third_party/toolchains/preconfig/generate:archives.bzl",
"bazel_toolchains_archive",
)
bazel_toolchains_archive()
load(
"@bazel_toolchains//repositories:repositories.bzl",
bazel_toolchains_repositories = "repositories",
)
bazel_toolchains_repositories()
# START: Upstream TensorFlow dependencies
# TensorFlow build depends on these dependencies.
# Needs to be in-sync with TensorFlow sources.
http_archive(
name = "io_bazel_rules_closure",
sha256 = "5b00383d08dd71f28503736db0500b6fb4dda47489ff5fc6bed42557c07c6ba9",
strip_prefix = "rules_closure-308b05b2419edb5c8ee0471b67a40403df940149",
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/rules_closure/archive/308b05b2419edb5c8ee0471b67a40403df940149.tar.gz",
"https://github.com/bazelbuild/rules_closure/archive/308b05b2419edb5c8ee0471b67a40403df940149.tar.gz", # 2019-06-13
],
)
http_archive(
name = "bazel_skylib",
sha256 = "1dde365491125a3db70731e25658dfdd3bc5dbdfd11b840b3e987ecf043c7ca0",
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/bazel-skylib/releases/download/0.9.0/bazel_skylib-0.9.0.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/0.9.0/bazel_skylib-0.9.0.tar.gz",
],
) # https://github.com/bazelbuild/bazel-skylib/releases
# END: Upstream TensorFlow dependencies
load("@tensorflow_serving//tensorflow_serving:workspace.bzl", "tf_serving_workspace")
tf_serving_workspace()
# Specify the minimum required bazel version.
load("@org_tensorflow//tensorflow:version_check.bzl", "check_bazel_version_at_least")
check_bazel_version_at_least("2.0.0")
# GPRC deps, required to match TF's. Only after calling tf_serving_workspace()
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
grpc_deps()
load("@upb//bazel:repository_defs.bzl", "bazel_version_repository")
bazel_version_repository(name = "bazel_version")
# AWS S3 SDK
new_local_repository(
name = "awssdk",
build_file = "@//third_party/aws:BUILD",
path = "/awssdk",
)
# Azure Storage SDK
new_local_repository(
name = "azure",
build_file = "@//third_party/azure:BUILD",
path = "/azure/azure-storage-cpp",
)
# Azure Storage SDK dependency - cpprest
new_local_repository(
name = "cpprest",
build_file = "@//third_party/cpprest:BUILD",
path = "/azure/cpprestsdk",
)
# Boost (needed for Azure Storage SDK)
new_local_repository(
name = "boost",
path = "/usr/local/lib/",
build_file = "@//third_party/boost:BUILD"
)
# Google Cloud SDK
http_archive(
name = "com_github_googleapis_google_cloud_cpp",
sha256 = "a370bcf2913717c674a7250c4a310250448ffeb751b930be559a6f1887155f3b",
strip_prefix = "google-cloud-cpp-0.21.0",
url = "https://github.com/googleapis/google-cloud-cpp/archive/v0.21.0.tar.gz",
)
load("@com_github_googleapis_google_cloud_cpp//bazel:google_cloud_cpp_deps.bzl", "google_cloud_cpp_deps")
google_cloud_cpp_deps()
load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
switched_rules_by_language(
name = "com_google_googleapis_imports",
cc = True, # C++ support is only "Partially implemented", roll our own.
grpc = True,
)
load("@com_github_googleapis_google_cloud_cpp_common//bazel:google_cloud_cpp_common_deps.bzl", "google_cloud_cpp_common_deps")
google_cloud_cpp_common_deps()
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
grpc_deps()
load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")
grpc_extra_deps()
# cxxopts
http_archive(
name = "cxxopts",
url = "https://github.com/jarro2783/cxxopts/archive/v2.2.0.zip",
sha256 = "f9640c00d9938bedb291a21f9287902a3a8cee38db6910b905f8eba4a6416204",
strip_prefix = "cxxopts-2.2.0",
build_file = "@//third_party/cxxopts:BUILD",
)
# RapidJSON
http_archive(
name = "rapidjson",
url = "https://github.com/Tencent/rapidjson/archive/v1.1.0.zip",
sha256 = "8e00c38829d6785a2dfb951bb87c6974fa07dfe488aa5b25deec4b8bc0f6a3ab",
strip_prefix = "rapidjson-1.1.0",
build_file = "@//third_party/rapidjson:BUILD"
)
# spdlog
http_archive(
name = "spdlog",
url = "https://github.com/gabime/spdlog/archive/v1.4.0.tar.gz",
sha256 = "afd18f62d1bc466c60bef088e6b637b0284be88c515cedc59ad4554150af6043",
strip_prefix = "spdlog-1.4.0",
build_file = "@//third_party/spdlog:BUILD"
)
# fmtlib
http_archive(
name = "fmtlib",
url = "https://github.com/fmtlib/fmt/archive/6.0.0.tar.gz",
sha256 = "f1907a58d5e86e6c382e51441d92ad9e23aea63827ba47fd647eacc0d3a16c78",
strip_prefix = "fmt-6.0.0",
build_file = "@//third_party/fmtlib:BUILD"
)
# libevent
http_archive(
name = "com_github_libevent_libevent",
url = "https://github.com/libevent/libevent/archive/release-2.1.8-stable.zip",
sha256 = "70158101eab7ed44fd9cc34e7f247b3cae91a8e4490745d9d6eb7edc184e4d96",
strip_prefix = "libevent-release-2.1.8-stable",
build_file = "@//third_party/libevent:BUILD",
)
##################### OPEN VINO ######################
# OPENVINO DEFINITION FOR BUILDING FROM BINARY RELEASE: ##########################
new_local_repository(
name = "openvino",
build_file = "@//third_party/openvino:BUILD",
path = "/opt/intel/openvino/deployment_tools",
)
################## END OF OPENVINO DEPENDENCY ##########
##################### OPEN CV ######################
# OPENCV DEFINITION FOR BUILDING FROM BINARY RELEASE: ##########################
new_local_repository(
name = "opencv",
build_file = "@//third_party/opencv:BUILD",
path = "/opt/intel/openvino/opencv",
)
################## END OF OPENCV DEPENDENCY ##########