Skip to content

Commit

Permalink
feat: Always enable the cuda_open plugin in the TUI (scie) installer (
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Mar 26, 2024
1 parent 165a2d4 commit ed7a55f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions changes/1966.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Always enable `ai.backend.accelerator.cuda_open` in the scie-based installer
2 changes: 1 addition & 1 deletion docs/install/install-from-package/install-agent.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ would be:
scaling-group = "default"
pid-file = "/home/bai/agent/agent.pid"
event-loop = "uvloop"
# allow-compute-plugins = "ai.backend.accelerator.cuda_open"
# allow-compute-plugins = ["ai.backend.accelerator.cuda_open"]
[container]
port-range = [30000, 31000]
Expand Down
11 changes: 10 additions & 1 deletion src/ai/backend/install/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,16 @@ async def configure_agent(self) -> None:
Path(self.install_info.service_config.agent_var_base_path).mkdir(
parents=True, exist_ok=True
)
# TODO: enable CUDA plugin if nvidia stack is detected
# enable the CUDA plugin (open-source version)
# The agent will show an error log if the CUDA is not available in the system and report
# "cuda.devices = 0" as the agent capacity, but it will still run.
self.sed_in_place(
toml_path,
re.compile("^(# )?allow-compute-plugins = .*"),
'allow-compute-plugins = ["ai.backend.accelerator.cuda_open"]',
)
# TODO: let the installer enable the CUDA plugin only when it verifies CUDA availability or
# via an explicit installer option/config.
r"""
if [ $ENABLE_CUDA -eq 1 ]; then
sed_inplace "s/# allow-compute-plugins =.*/allow-compute-plugins = [\"ai.backend.accelerator.cuda_open\"]/" ./agent.toml
Expand Down

0 comments on commit ed7a55f

Please sign in to comment.