Skip to content

Commit fc1ad15

Browse files
shanshanptliutongxuan
authored andcommitted
[DeepRec] Add boost and AWS dependency to avoid build error. (#6)
1 parent 655c170 commit fc1ad15

File tree

8 files changed

+211
-3
lines changed

8 files changed

+211
-3
lines changed

WORKSPACE

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,20 @@ http_archive(
3131
)
3232
http_archive(
3333
name = "bazel_skylib",
34-
sha256 = "2c62d8cd4ab1e65c08647eb4afe38f51591f43f7f0885e7769832fa137633dcb",
35-
strip_prefix = "bazel-skylib-0.7.0",
36-
urls = ["https://github.com/bazelbuild/bazel-skylib/archive/0.7.0.tar.gz"],
34+
sha256 = "2ef429f5d7ce7111263289644d233707dba35e39696377ebab8b0bc701f7818e",
35+
urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/0.8.0/bazel-skylib.0.8.0.tar.gz"],
3736
)
37+
38+
http_archive(
39+
name = "com_github_nelhage_rules_boost",
40+
sha256 = "f8c9653c1c49489c04f9f87ab1ee93d7b59bb26a39d9e30e9687fca3c6197c3f",
41+
strip_prefix = "rules_boost-9f9fb8b2f0213989247c9d5c0e814a8451d18d7f",
42+
urls = ["https://github.com/nelhage/rules_boost/archive/9f9fb8b2f0213989247c9d5c0e814a8451d18d7f.tar.gz"],
43+
)
44+
45+
load("@com_github_nelhage_rules_boost//:boost/boost.bzl", "boost_deps")
46+
boost_deps()
47+
3848
# END: Upstream TensorFlow dependencies
3949

4050
# Please add all new TensorFlow Serving dependencies in workspace.bzl.

tensorflow_serving/workspace.bzl

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,59 @@ def tf_serving_workspace():
5656
"https://github.com/abseil/abseil-cpp/archive/36d37ab992038f52276ca66b9da80c1cf0f57dc2.tar.gz",
5757
],
5858
)
59+
60+
http_archive(
61+
name = "aws_c_common",
62+
build_file = str(Label("//third_party/aws_util:aws_c_common.BUILD")),
63+
sha256 = "e9462a141b5db30006704f537d19b92357a59be38d590272e6118976b0356ccd",
64+
strip_prefix = "aws-c-common-0.7.4",
65+
urls = [
66+
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/awslabs/aws-c-common/archive/refs/tags/v0.7.4.tar.gz",
67+
"https://github.com/awslabs/aws-c-common/archive/refs/tags/v0.7.4.tar.gz",
68+
],
69+
)
70+
71+
http_archive(
72+
name = "aws_c_io",
73+
build_file = str(Label("//third_party/aws_util:aws_c_io.BUILD")),
74+
sha256 = "b60270d23b6e2f4a5d80e64ca6538ba114cd6044b53752964c940f87e59bf0d9",
75+
strip_prefix = "aws-c-io-0.11.2",
76+
urls = [
77+
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/awslabs/aws-c-io/archive/refs/tags/v0.11.2.tar.gz",
78+
"https://github.com/awslabs/aws-c-io/archive/refs/tags/v0.11.2.tar.gz",
79+
],
80+
)
81+
82+
http_archive(
83+
name = "aws_c_event_stream",
84+
build_file = str(Label("//third_party/aws_util:aws_c_event_stream.BUILD")),
85+
sha256 = "bae0c762b6a4b779a0db0f4730512da6cb500e76681ffdcb9f7286d8e26e547a",
86+
strip_prefix = "aws-c-event-stream-0.2.6",
87+
urls = [
88+
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/awslabs/aws-c-event-stream/archive/refs/tags/v0.2.6.tar.gz",
89+
"https://github.com/awslabs/aws-c-event-stream/archive/refs/tags/v0.2.6.tar.gz",
90+
],
91+
)
92+
93+
http_archive(
94+
name = "aws_checksums",
95+
build_file = str(Label("//third_party/aws_util:aws_checksums.BUILD")),
96+
sha256 = "394723034b81cc7cd528401775bc7aca2b12c7471c92350c80a0e2fb9d2909fe",
97+
strip_prefix = "aws-checksums-0.1.12",
98+
urls = [
99+
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/awslabs/aws-checksums/archive/refs/tags/v0.1.12.tar.gz",
100+
"https://github.com/awslabs/aws-checksums/archive/refs/tags/v0.1.12.tar.gz",
101+
],
102+
)
103+
104+
http_archive(
105+
name = "aws_c_cal",
106+
build_file = str(Label("//third_party/aws_util:aws_c_cal.BUILD")),
107+
sha256 = "40297da04443d4ee2988d1c5fb0dc4a156d0e4cfaf80e6a1df1867452566d540",
108+
strip_prefix = "aws-c-cal-0.5.17",
109+
urls = [
110+
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/awslabs/aws-c-cal/archive/refs/tags/v0.5.17.tar.gz",
111+
"https://github.com/awslabs/aws-c-cal/archive/refs/tags/v0.5.17.tar.gz",
112+
],
113+
)
114+

third_party/aws_util/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Dummy BUILD file to make this directory a package.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Description:
2+
# AWS C CAL
3+
4+
package(default_visibility = ["//visibility:public"])
5+
6+
licenses(["notice"]) # Apache 2.0
7+
8+
exports_files(["LICENSE"])
9+
10+
cc_library(
11+
name = "aws_c_cal",
12+
srcs = glob([
13+
"include/aws/cal/**/*.h",
14+
"source/*.c",
15+
"source/unix/*.c",
16+
]),
17+
includes = [
18+
"include/",
19+
],
20+
deps = [
21+
"@aws_c_common",
22+
],
23+
)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Description:
2+
# AWS C COMMON
3+
4+
package(default_visibility = ["//visibility:public"])
5+
6+
licenses(["notice"]) # Apache 2.0
7+
8+
exports_files(["LICENSE"])
9+
10+
load("@org_tensorflow//third_party:common.bzl", "template_rule")
11+
12+
cc_library(
13+
name = "aws_c_common",
14+
srcs = glob([
15+
"include/aws/common/**/*.h",
16+
"include/aws/common/**/*.inl",
17+
"source/*.c",
18+
"source/posix/*.c",
19+
"source/arch/intel/cpuid.c",
20+
"source/arch/intel/asm/cpuid.c",
21+
]),
22+
hdrs = [
23+
"include/aws/common/config.h",
24+
],
25+
includes = [
26+
"include/",
27+
],
28+
defines = [
29+
"AWS_AFFINITY_METHOD=AWS_AFFINITY_METHOD_PTHREAD_ATTR",
30+
],
31+
)
32+
33+
template_rule(
34+
name = "COMMONConfig_h",
35+
src = "include/aws/common/config.h.in",
36+
out = "include/aws/common/config.h",
37+
substitutions = {
38+
"cmakedefine": "define",
39+
},
40+
)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Description:
2+
# AWS C EVENT STREAM
3+
4+
package(default_visibility = ["//visibility:public"])
5+
6+
licenses(["notice"]) # Apache 2.0
7+
8+
exports_files(["LICENSE"])
9+
10+
cc_library(
11+
name = "aws_c_event_stream",
12+
srcs = glob([
13+
"include/aws/event-stream/*.h",
14+
"source/event_stream.c",
15+
]),
16+
includes = [
17+
"include/",
18+
],
19+
deps = [
20+
"@aws_c_common",
21+
"@aws_checksums",
22+
"@aws_c_io",
23+
],
24+
)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Description:
2+
# AWS C IO
3+
4+
package(default_visibility = ["//visibility:public"])
5+
6+
licenses(["notice"]) # Apache 2.0
7+
8+
exports_files(["LICENSE"])
9+
10+
cc_library(
11+
name = "aws_c_io",
12+
srcs = glob([
13+
"include/aws/io/**/*.h",
14+
"source/*.c",
15+
"source/pkcs11/v2.40/*.h",
16+
"source/pkcs11_private.h",
17+
"source/posix/*.c",
18+
"source/linux/*.c",
19+
]),
20+
includes = [
21+
"include/",
22+
"source/",
23+
],
24+
deps = [
25+
"@aws_c_common",
26+
"@aws_c_cal"
27+
],
28+
defines = [
29+
"BYO_CRYPTO",
30+
],
31+
)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Description:
2+
# AWS CHECKSUMS
3+
4+
package(default_visibility = ["//visibility:public"])
5+
6+
licenses(["notice"]) # Apache 2.0
7+
8+
exports_files(["LICENSE"])
9+
10+
cc_library(
11+
name = "aws_checksums",
12+
srcs = glob([
13+
"include/aws/checksums/**/*.h",
14+
"source/*.c",
15+
"source/intel/asm/*.c",
16+
]),
17+
includes = [
18+
"include/",
19+
],
20+
deps = [
21+
"@aws_c_common",
22+
],
23+
)

0 commit comments

Comments
 (0)