Skip to content

Commit

Permalink
chore: Add PEX, SCIE binary build configs for the plugin subsystem (#…
Browse files Browse the repository at this point in the history
…2422)

Co-authored-by: Joongi Kim <[email protected]>
  • Loading branch information
jopemachine and achimnol authored Jul 17, 2024
1 parent 19df64c commit 60af16b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions changes/2422.misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add PEX, SCIE binary build configs for the plugin subsystem.
1 change: 1 addition & 0 deletions src/ai/backend/cli/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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/**",
Expand Down
30 changes: 29 additions & 1 deletion src/ai/backend/plugin/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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")

0 comments on commit 60af16b

Please sign in to comment.