Commit 7db61a43 authored by Ziqi Fan's avatar Ziqi Fan Committed by GitHub
Browse files

feat: rename dynamo-sdk to dynamo; add dynamo run to call dynamo-run under the...

feat: rename dynamo-sdk to dynamo; add dynamo run to call dynamo-run under the hood for unification (#104)
parent ab33729b
......@@ -30,7 +30,7 @@ dependencies = [
]
[project.scripts]
dynamo-sdk = "dynamo.sdk.cli.cli:cli"
dynamo = "dynamo.sdk.cli.cli:cli"
[tool.setuptools]
namespace-packages = ["dynamo"]
......
......@@ -35,6 +35,7 @@ def create_bentoml_cli() -> click.Command:
from bentoml_cli.secret import secret_command
from bentoml_cli.utils import BentoMLCommandGroup, get_entry_points
from dynamo.sdk.cli.run import run_command
from dynamo.sdk.cli.serve import serve_command
from dynamo.sdk.cli.start import start_command
......@@ -54,6 +55,7 @@ def create_bentoml_cli() -> click.Command:
bentoml_cli.add_subcommands(bento_command)
bentoml_cli.add_subcommands(start_command)
bentoml_cli.add_subcommands(serve_command)
bentoml_cli.add_subcommands(run_command)
bentoml_cli.add_command(containerize_command)
bentoml_cli.add_command(deploy_command)
bentoml_cli.add_command(develop_command)
......
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import annotations
import subprocess
import sys
import click
def build_run_command() -> click.Group:
from bentoml_cli.utils import BentoMLCommandGroup
@click.group(name="run", cls=BentoMLCommandGroup)
def cli():
pass
@cli.command(
context_settings=dict(
ignore_unknown_options=True,
allow_extra_args=True,
),
)
def run() -> None:
"""Call dynamo-run with remaining arguments"""
command = ["dynamo-run"] + sys.argv[2:]
subprocess.run(command)
return cli
run_command = build_run_command()
......@@ -30,7 +30,7 @@ def setup_and_teardown():
server = subprocess.Popen(
[
"dynamo-sdk",
"dynamo",
"serve",
"pipeline:Frontend",
"--working-dir",
......
......@@ -316,7 +316,7 @@ wheels = [
]
[[package]]
name = "dynamo-sdk"
name = "dynamo"
version = "0.1.0"
source = { editable = "." }
dependencies = [
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment