some improvements for none cases

This commit is contained in:
Vladislav 2024-12-16 19:02:51 +01:00
parent 89aadb793a
commit 22875a5ce0
4 changed files with 11 additions and 15 deletions

View file

@ -121,6 +121,8 @@ def build_image(build_config: BuildConfig, build_file_path: Path):
str(BUILDS_BASE_DIR / ImageType.docker.value),
" ".join(normal_deps),
]
if build_config.platform is not None:
args.append(build_config.platform)
elif build_config.image_type == ImageType.conda.value:
script = pkg_resources.resource_filename(
"llama_stack", "distribution/build_conda_env.sh"

View file

@ -25,7 +25,6 @@ from llama_stack.providers.utils.kvstore.config import KVStoreConfig
LLAMA_STACK_BUILD_CONFIG_VERSION = "2"
LLAMA_STACK_RUN_CONFIG_VERSION = "2"
LLAMA_STACK_DEFAULT_PLATFORM = "linux/arm64"
RoutingKey = Union[str, List[str]]
@ -168,7 +167,7 @@ class BuildConfig(BaseModel):
default="conda",
description="Type of package to build (conda | docker | venv)",
)
platform: str = Field(
default=LLAMA_STACK_DEFAULT_PLATFORM,
description="The platform for docker image, defaults to linux/arm64",
platform: Optional[str] = Field(
default=None,
description="The platform for docker image",
)