forked from openvinotoolkit/model_server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
106 lines (98 loc) · 4.18 KB
/
BUILD.bazel
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
#
# Copyright (c) 2023 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.
#
licenses(["notice"])
exports_files([
"package.json",
"yarn.lock",
])
load("@bazel_skylib//lib:selects.bzl", "selects")
load("@mediapipe//mediapipe/framework:more_selects.bzl", "more_selects")
config_setting(
name = "disable_mediapipe",
define_values = {
"MEDIAPIPE_DISABLE": "1",
},
visibility = ["//visibility:public"],
)
more_selects.config_setting_negation(
name = "not_disable_mediapipe",
negate = ":disable_mediapipe",
)
#To build without python use flags - bazel build --define PYTHON_DISABLE=1 --cxxopt=-DPYTHON_DISABLE=1 //src:ovms
config_setting(
name = "disable_python",
define_values = {
"PYTHON_DISABLE": "1",
},
visibility = ["//visibility:public"],
)
more_selects.config_setting_negation(
name = "not_disable_python",
negate = ":disable_python",
)
cc_library(
name = "ovms_dependencies",
deps = [
"@tensorflow_serving//tensorflow_serving/apis:prediction_service_cc_proto",
"@tensorflow_serving//tensorflow_serving/apis:model_service_cc_proto",
"@minitrace//:trace",
"@com_github_grpc_grpc//:grpc++",
"@org_tensorflow//tensorflow/core:framework",
"@com_github_tencent_rapidjson//:rapidjson",
"@com_github_gabime_spdlog//:spdlog",
"@com_github_jarro2783_cxxopts//:cxxopts",
"@awssdk//:s3",
"@awssdk//:core",
"@awssdk//:deps",
"@azure//:storage",
"@cpprest//:sdk",
"@boost//:lib",
"@com_github_googleapis_google_cloud_cpp//google/cloud/storage:storage_client",
"@tensorflow_serving//tensorflow_serving/util/net_http/server/public:http_server",
"@tensorflow_serving//tensorflow_serving/util/net_http/server/public:http_server_api",
"@tensorflow_serving//tensorflow_serving/util:threadpool_executor",
"@tensorflow_serving//tensorflow_serving/util:json_tensor",
"@linux_openvino//:openvino",
"@linux_opencv//:opencv",
"@com_github_jupp0r_prometheus_cpp//core",
"@oneTBB//:tbb",
] + select({
"//:not_disable_mediapipe": [
"@mediapipe//mediapipe/framework:calculator_framework",
"@mediapipe//mediapipe/framework/stream_handler:barrier_input_stream_handler",
"@mediapipe//mediapipe/framework/stream_handler:default_input_stream_handler",
"@mediapipe//mediapipe/framework/stream_handler:early_close_input_stream_handler",
"@mediapipe//mediapipe/framework/stream_handler:fixed_size_input_stream_handler",
"@mediapipe//mediapipe/framework/stream_handler:immediate_input_stream_handler",
"@mediapipe//mediapipe/framework/stream_handler:in_order_output_stream_handler",
"@mediapipe//mediapipe/framework/stream_handler:mux_input_stream_handler",
"@mediapipe//mediapipe/framework/stream_handler:sync_set_input_stream_handler", # added directly for python yielding (cycle), add more if needed
"@mediapipe//mediapipe/framework/stream_handler:timestamp_align_input_stream_handler",
"@mediapipe//mediapipe/framework/port:logging",
"@mediapipe//mediapipe/framework/port:parse_text_proto",
"@mediapipe//mediapipe/framework/port:status",
"@model_api//:model_api",],
"//:disable_mediapipe": []
})
+ select({
"//:not_disable_python": [
"@python3_linux//:python3-lib",
"@pybind11//:pybind11_embed",
],
"//:disable_python": []
}),
visibility = ["//visibility:public"],
)