-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMODULE.bazel
More file actions
165 lines (145 loc) · 6.43 KB
/
Copy pathMODULE.bazel
File metadata and controls
165 lines (145 loc) · 6.43 KB
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
"""bzlmod wrapper around the fim (FastImage) library.
Consumers reference targets as `@fimage//:fimage`, `@fimage//python:fim`, etc.
Wired into the aiforoncology monorepo via local_path_override; builds standalone
in the NKI-AI/fimage checkout via the git_override / http_archive deps below.
"""
module(
name = "fimage",
version = "0.1.2",
)
bazel_dep(name = "rules_cc", version = "0.2.17")
bazel_dep(name = "platforms", version = "1.1.0")
bazel_dep(name = "bazel_skylib", version = "1.9.0")
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "rules_multirun", version = "0.13.0")
bazel_dep(name = "googletest", version = "1.17.0")
bazel_dep(name = "google_benchmark", version = "1.9.2")
bazel_dep(name = "cli11", version = "2.6.2")
# Codecs / SIMD pulled from the Bazel Central Registry. libtiff (vendored BUILD
# below) links jpeg/webp/lzma/zlib/zstd; the fim utilities use lz4 + zstd.
bazel_dep(name = "zlib", version = "1.3.1.bcr.5")
bazel_dep(name = "zstd", version = "1.5.7")
bazel_dep(name = "lz4", version = "1.10.0.bcr.1")
bazel_dep(name = "libjpeg_turbo", version = "2.1.91")
bazel_dep(name = "libwebp", version = "1.5.0")
bazel_dep(name = "xz", version = "5.4.5.bcr.5")
# aifocore-cpp is not on the Bazel Central Registry. In the monorepo this
# bazel_dep is satisfied by the root module's local_path_override; the
# git_override below is silently ignored in that context (Bazel only honors
# *_override directives in the root module). When this MODULE.bazel is the root
# (i.e. the standalone NKI-AI/fimage checkout), the git_override resolves the
# dep from GitHub instead.
bazel_dep(name = "aifocore-cpp", version = "0.0.1")
git_override(
module_name = "aifocore-cpp",
commit = "e09db7a3b6ee6decb84b08e22080158012b15a46",
remote = "https://github.com/NKI-AI/aifocore.git",
)
# fastslide is not on the Bazel Central Registry. In the monorepo this bazel_dep
# is satisfied by the root module's local_path_override; the git_override below
# is ignored there. Standalone (NKI-AI/fimage) it resolves fastslide from the
# published NKI-AI/fastslide repository.
bazel_dep(name = "fastslide", version = "0.0.1")
git_override(
module_name = "fastslide",
commit = "4849d487b7e8f7dfab740bc1ead5078648246c06",
remote = "https://github.com/NKI-AI/fastslide.git",
)
# fastslide pulls in these off-registry modules. Their git_overrides live in
# fastslide's MODULE.bazel, but Bazel only honors *_override directives from the
# root module, so a standalone fimage build (where fimage is root) must repeat
# them verbatim to resolve fastslide's module graph. Commits are kept in sync
# with fastslide/MODULE.bazel. In the monorepo these are satisfied by the root's
# local_path_overrides and the git_overrides here are ignored.
bazel_dep(name = "simpletiff", version = "0.0.1")
git_override(
module_name = "simpletiff",
commit = "38865229481f9a5c00f5a70fc6a2444f3cd3ccfd",
remote = "https://github.com/NKI-AI/simpletiff.git",
)
bazel_dep(name = "jpeg-compressor", version = "0.0.1")
git_override(
module_name = "jpeg-compressor",
commit = "927f759d349b7ce2588d50465d719c42011ccb4b",
remote = "https://github.com/NKI-AI/jpeg-compressor.git",
)
bazel_dep(name = "jxrlib", version = "1.1.0")
git_override(
module_name = "jxrlib",
commit = "7632349d973656c773f7ecb45325390f463bc92a",
remote = "https://github.com/NKI-AI/jxrlib.git",
)
bazel_dep(name = "nanobind_bazel", version = "2.12.0")
bazel_dep(name = "rules_python", version = "2.0.0")
bazel_dep(name = "aspect_rules_py", version = "1.11.5")
bazel_dep(name = "rules_uv", version = "0.89.2")
bazel_dep(name = "rules_doxygen", version = "2.5.0")
bazel_dep(name = "sphinxdocs", version = "2.0.1")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
is_default = True,
python_version = "3.11",
)
python.toolchain(python_version = "3.10")
python.toolchain(python_version = "3.12")
python.toolchain(python_version = "3.13")
python.toolchain(python_version = "3.14")
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
enable_implicit_namespace_pkgs = True,
hub_name = "fimage_pip",
python_version = "3.11",
requirements_darwin = "//:requirements_darwin.txt",
requirements_lock = "//:requirements_linux.txt",
)
pip.parse(
enable_implicit_namespace_pkgs = True,
hub_name = "fimage_docs_pip",
python_version = "3.11",
requirements_darwin = "//docs:requirements_darwin.txt",
requirements_lock = "//docs:requirements_linux.txt",
)
use_repo(pip, "fimage_docs_pip", "fimage_pip")
doxygen_extension = use_extension("@rules_doxygen//:extensions.bzl", "doxygen_extension")
doxygen_extension.repository(name = "fimage_doxygen")
doxygen_extension.configuration(
platform = "mac",
version = "0.0.0",
)
use_repo(doxygen_extension, "fimage_doxygen")
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "hwy",
patch_args = ["-p1"],
patches = ["//third_party:hwy_bazel_includes.patch"],
sha256 = "e8d696900b45f4123be8a9d6866f4e7b6831bf599f4b9c178964d968e6a58a69",
strip_prefix = "highway-1.3.0",
urls = ["https://github.com/google/highway/releases/download/1.3.0/highway-1.3.0.tar.gz"],
)
http_archive(
name = "libtiff",
build_file = "//third_party:libtiff.BUILD",
sha256 = "273a0a73b1f0bed640afee4a5df0337357ced5b53d3d5d1c405b936501f71017",
strip_prefix = "tiff-4.7.0",
urls = ["https://download.osgeo.org/libtiff/tiff-4.7.0.tar.xz"],
)
http_archive(
name = "libspng",
build_file = "//third_party:libspng.BUILD",
sha256 = "47ec02be6c0a6323044600a9221b049f63e1953faf816903e7383d4dc4234487",
strip_prefix = "libspng-0.7.4",
urls = ["https://github.com/randy408/libspng/archive/v0.7.4.tar.gz"],
)
http_archive(
name = "lodepng",
build_file = "//third_party:lodepng.BUILD",
sha256 = "e3e5a62322b7afd5037d0aaa27188457226ccdaacc1353d0a1efcccd8f87f504",
strip_prefix = "lodepng-ed6fe5825c6a4fbb7f58ab35a4231c7543cd452a",
urls = ["https://github.com/lvandeve/lodepng/archive/ed6fe5825c6a4fbb7f58ab35a4231c7543cd452a.zip"],
)
# Hermetic C++ toolchain for cross-compilation (opt-in via --config=hermetic).
# Uses Zig's compiler for hermetic cross-compilation without replacing the
# default host toolchain.
bazel_dep(name = "hermetic_cc_toolchain", version = "4.1.0")
toolchains = use_extension("@hermetic_cc_toolchain//toolchain:ext.bzl", "toolchains")
use_repo(toolchains, "zig_sdk")