-
Notifications
You must be signed in to change notification settings - Fork 1
/
MODULE.bazel
73 lines (60 loc) · 2.18 KB
/
MODULE.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
module(
name = "tf-shell",
version = "0.1.13",
)
SUPPORTED_PYTHON_VERSIONS = [
"3.9",
"3.10",
"3.11",
"3.12",
] # Also see ./.github/workflows/wheel.yaml
DEFAULT_PYTHON = "3.10" # Also see ./BUILD
bazel_dep(name = "rules_python", version = "0.37.2")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
[
python.toolchain(
is_default = version == DEFAULT_PYTHON,
python_version = version,
)
for version in SUPPORTED_PYTHON_VERSIONS
]
use_repo(
python,
"python_versions",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
[
pip.parse(
hub_name = "pip",
python_version = version,
requirements_lock = "//:requirements_" + version.replace(".", "_") + ".txt",
)
for version in SUPPORTED_PYTHON_VERSIONS
]
use_repo(pip, "pip")
# Since we compile against the tensorflow headers which make heavy use of
# abseil, the version used here must match the version used by tensorflow.
# See what version of abseil tensorflow is using here:
# https://github.com/tensorflow/tensorflow/blob/master/third_party/absl/workspace.bzl
bazel_dep(name = "abseil-cpp", version = "20230802.1", repo_name = "com_google_absl")
single_version_override(
module_name = "abseil-cpp",
version = "20230802.1",
)
# Additionally, tensorflow headers use a protobuf version which which is a
# python dependency. Other dependencies (like rules_cc >= 0.0.13 and tink_cc)
# also use protobuf, so the versions must match.
bazel_dep(name = "protobuf", version = "21.7")
single_version_override(
module_name = "protobuf",
version = "21.7",
)
# Note, rule_cc>=0.0.13 is not compatible with protobuf 3.21.7, as required by
# TensorFlow.
bazel_dep(name = "rules_cc", version = "0.0.12")
bazel_dep(name = "glog", version = "0.7.1", repo_name = "com_github_google_glog")
bazel_dep(name = "boringssl", version = "0.20240930.0")
bazel_dep(name = "googletest", version = "1.15.2")
bazel_dep(name = "tink_cc", version = "2.2.0", repo_name = "com_github_tink_crypto_tink_cc")
bazel_dep(name = "rules_foreign_cc", version = "0.12.0")
bazel_dep(name = "buildifier_prebuilt", version = "7.3.1", dev_dependency = True)