From 2f0cab20d22ee544f16c0fcb68c288f8bdfec345 Mon Sep 17 00:00:00 2001 From: bojiang <5886138+bojiang@users.noreply.github.com> Date: Sat, 11 Jan 2025 12:02:26 +0800 Subject: [PATCH] fix: build-bento (#24) --- src/comfy_pack/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/comfy_pack/cli.py b/src/comfy_pack/cli.py index 870bacc..3ba1cf9 100644 --- a/src/comfy_pack/cli.py +++ b/src/comfy_pack/cli.py @@ -420,9 +420,9 @@ def run(ctx, cpack: str, output_dir: str, help: bool, verbose: int): @main.command(name="build-bento") +@click.argument("source") @click.option("--name", help="Name of the bento service") @click.option("--version", help="Version of the bento service") -@click.argument("source") def bento_cmd(source: str, name: str | None, version: str | None): """Build a bento from the source, which can be either a .cpack.zip file or a bento tag.""" import bentoml @@ -439,7 +439,7 @@ def bento_cmd(source: str, name: str | None, version: str | None): else: existing_bento = bentoml.get(source) name = name or existing_bento.tag.name - shutil.copytree(existing_bento.path, temp_dir, dirs_exist_ok=True) + shutil.copytree(existing_bento.path_of("src"), temp_dir, dirs_exist_ok=True) build_config = BentoBuildConfig.from_bento_dir( existing_bento.path_of("src") )