Skip to content

Commit

Permalink
feat: add triton-inference-server-common. (#2975)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanli authored Oct 29, 2024
1 parent 3fed4b8 commit 8428c90
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module(
name = "triton-inference-server-common",
version = "0.0.0-20240821-578491f",
compatibility_level = 0,
)

bazel_dep(name = "rules_proto", version = "6.0.2")
bazel_dep(name = "rules_proto_grpc_cpp", version = "5.0.0")
bazel_dep(name = "toolchains_protoc", version = "0.3.1")

protoc = use_extension("@toolchains_protoc//protoc:extensions.bzl", "protoc")
protoc.toolchain(
google_protobuf = "com_google_protobuf",
version = "v27.1",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
diff --git a/MODULE.bazel b/MODULE.bazel
new file mode 100644
index 0000000..037be46
--- /dev/null
+++ b/MODULE.bazel
@@ -0,0 +1,15 @@
+module(
+ name = "triton-inference-server-common",
+ version = "0.0.0-20240821-578491f",
+ compatibility_level = 0,
+)
+
+bazel_dep(name = "rules_proto", version = "6.0.2")
+bazel_dep(name = "rules_proto_grpc_cpp", version = "5.0.0")
+bazel_dep(name = "toolchains_protoc", version = "0.3.1")
+
+protoc = use_extension("@toolchains_protoc//protoc:extensions.bzl", "protoc")
+protoc.toolchain(
+ google_protobuf = "com_google_protobuf",
+ version = "v27.1",
+)
diff --git a/protobuf/BUILD b/protobuf/BUILD
new file mode 100644
index 0000000..c6cf835
--- /dev/null
+++ b/protobuf/BUILD
@@ -0,0 +1,24 @@
+load("@rules_proto//proto:defs.bzl", "proto_library")
+load("@rules_proto_grpc_cpp//:defs.bzl", "cpp_grpc_library", "cpp_proto_library")
+
+package(default_visibility = ["//visibility:public"])
+
+proto_library(
+ name = "common_proto",
+ srcs = [
+ "grpc_service.proto",
+ "health.proto",
+ "model_config.proto",
+ ],
+ import_prefix = "triton/",
+)
+
+cpp_proto_library(
+ name = "common_cc_proto",
+ protos = [":common_proto"],
+)
+
+cpp_grpc_library(
+ name = "common_cc_grpc",
+ protos = [":common_proto"],
+)
diff --git a/protobuf/grpc_service.proto b/protobuf/grpc_service.proto
index 451dd74..d86c024 100644
--- a/protobuf/grpc_service.proto
+++ b/protobuf/grpc_service.proto
@@ -30,7 +30,7 @@ package inference;

//@@.. cpp:namespace:: inference

-import "model_config.proto";
+import "triton/protobuf/model_config.proto";

//@@
//@@.. cpp:var:: service InferenceService
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
matrix:
platform:
- ubuntu2004
- ubuntu2204
- macos
- macos_arm64
- windows
bazel:
- 7.x
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- '@triton-inference-server-common//protobuf:common_proto'
- '@triton-inference-server-common//protobuf:common_cc_proto'
- '@triton-inference-server-common//protobuf:common_cc_grpc'
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"url": "https://github.com/triton-inference-server/common/archive/578491fc3944f77d16a6a38e3d7691c485c47ba0.tar.gz",
"integrity": "sha256-LoQ7aZCwrBdHpbFPrh0mSdXmp/AuM6D675F4QmEAOjI=",
"strip_prefix": "common-578491fc3944f77d16a6a38e3d7691c485c47ba0",
"patches": {
"triton-inference-server-common.modules.patch": "sha256-pkymDS5fTtTi/w+XLtP9soLw28aG0Qbs4JNC1E4A/LQ="
},
"patch_strip": 1
}
17 changes: 17 additions & 0 deletions modules/triton-inference-server-common/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"homepage": "https://github.com/triton-inference-server/common",
"maintainers": [
{
"email": "[email protected]",
"github": "ryanli",
"name": "Ryan Li"
}
],
"repository": [
"github:triton-inference-server/common"
],
"versions": [
"0.0.0-20240821-578491f"
],
"yanked_versions": {}
}

0 comments on commit 8428c90

Please sign in to comment.