fix build command

This commit is contained in:
Xi Yan 2024-09-10 11:06:32 -07:00
parent 0981193d78
commit 5bf2fe452d

View file

@ -8,6 +8,7 @@ import argparse
from llama_toolchain.cli.subcommand import Subcommand from llama_toolchain.cli.subcommand import Subcommand
from llama_toolchain.core.datatypes import * # noqa: F403 from llama_toolchain.core.datatypes import * # noqa: F403
import yaml
from llama_toolchain.common.config_dirs import DISTRIBS_BASE_DIR from llama_toolchain.common.config_dirs import DISTRIBS_BASE_DIR
@ -55,14 +56,14 @@ class StackBuild(Subcommand):
allowed_ids = [d.distribution_type for d in available_distribution_specs()] allowed_ids = [d.distribution_type for d in available_distribution_specs()]
self.parser.add_argument( self.parser.add_argument(
"distribution", "--distribution",
type=str, type=str,
help='Distribution to build (either "adhoc" OR one of: {})'.format( help='Distribution to build (either "adhoc" OR one of: {})'.format(
allowed_ids allowed_ids
), ),
) )
self.parser.add_argument( self.parser.add_argument(
"api_providers", "--api-providers",
nargs="?", nargs="?",
help="Comma separated list of (api=provider) tuples", help="Comma separated list of (api=provider) tuples",
) )
@ -71,7 +72,6 @@ class StackBuild(Subcommand):
"--name", "--name",
type=str, type=str,
help="Name of the build target (image, conda env)", help="Name of the build target (image, conda env)",
required=True,
) )
self.parser.add_argument( self.parser.add_argument(
"--package-type", "--package-type",