From 60af16b9bdb4d0cf93224afea13101f8b739406d Mon Sep 17 00:00:00 2001 From: Gyubong Lee Date: Wed, 17 Jul 2024 16:57:01 +0900 Subject: [PATCH] chore: Add PEX, SCIE binary build configs for the plugin subsystem (#2422) Co-authored-by: Joongi Kim --- changes/2422.misc.md | 1 + src/ai/backend/cli/BUILD | 1 + src/ai/backend/plugin/BUILD | 30 +++++++++++++++++++++++++++++- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 changes/2422.misc.md diff --git a/changes/2422.misc.md b/changes/2422.misc.md new file mode 100644 index 0000000000..10af65eac1 --- /dev/null +++ b/changes/2422.misc.md @@ -0,0 +1 @@ +Add PEX, SCIE binary build configs for the plugin subsystem. diff --git a/src/ai/backend/cli/BUILD b/src/ai/backend/cli/BUILD index 979bcff803..07194297b2 100644 --- a/src/ai/backend/cli/BUILD +++ b/src/ai/backend/cli/BUILD @@ -14,6 +14,7 @@ visibility_private_component( "//src/ai/backend/web/**", "//src/ai/backend/install/**", "//src/ai/backend/wsproxy/**", + "//src/ai/backend/plugin/**", ], allowed_dependencies=[ "//src/ai/backend/plugin/**", diff --git a/src/ai/backend/plugin/BUILD b/src/ai/backend/plugin/BUILD index 14d7f12400..f375baf14e 100644 --- a/src/ai/backend/plugin/BUILD +++ b/src/ai/backend/plugin/BUILD @@ -18,7 +18,9 @@ visibility_private_component( "//src/ai/backend/testutils/**", "//src/ai/backend/install/**", ], - allowed_dependencies=[], + allowed_dependencies=[ + "//src/ai/backend/cli/**", + ], ) python_distribution( @@ -52,3 +54,29 @@ resources( "**/py.typed", ], ) + +pex_binary( + name="pex", + entry_point="ai.backend.cli.__main__", + dependencies=[ + ":src", + ":buildscript", + "!!stubs/trafaret:stubs", + ], +) + +scie_binary( + name="backendai-plugin", + fat=False, + dependencies=[":pex"], + tags=["scie", "lazy"], +) + +scie_binary( + name="backendai-plugin-fat", + fat=True, + dependencies=[":pex"], + tags=["scie", "fat"], +) + +resource(name="buildscript", source="BUILD")