mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-27 18:50:41 +00:00
fix #100
This commit is contained in:
parent
37be3fb184
commit
ca7602a642
2 changed files with 4 additions and 3 deletions
|
@ -95,9 +95,9 @@ class StackBuild(Subcommand):
|
|||
# save build.yaml spec for building same distribution again
|
||||
if build_config.image_type == ImageType.docker.value:
|
||||
# docker needs build file to be in the llama-stack repo dir to be able to copy over to the image
|
||||
llama_stack_path = Path(os.path.relpath(__file__)).parent.parent.parent
|
||||
llama_stack_path = Path(os.path.abspath(__file__)).parent.parent.parent.parent
|
||||
build_dir = (
|
||||
llama_stack_path / "configs/distributions" / build_config.image_type
|
||||
llama_stack_path / "tmp/configs/"
|
||||
)
|
||||
else:
|
||||
build_dir = (
|
||||
|
|
|
@ -103,7 +103,7 @@ add_to_docker <<EOF
|
|||
|
||||
EOF
|
||||
|
||||
add_to_docker "ADD $build_file_path ./llamastack-build.yaml"
|
||||
add_to_docker "ADD tmp/configs/$(basename "$build_file_path") ./llamastack-build.yaml"
|
||||
|
||||
printf "Dockerfile created successfully in $TEMP_DIR/Dockerfile"
|
||||
cat $TEMP_DIR/Dockerfile
|
||||
|
@ -116,6 +116,7 @@ fi
|
|||
if [ -n "$LLAMA_MODELS_DIR" ]; then
|
||||
mounts="$mounts -v $(readlink -f $LLAMA_MODELS_DIR):$models_mount"
|
||||
fi
|
||||
|
||||
set -x
|
||||
$DOCKER_BINARY build $DOCKER_OPTS -t $image_name -f "$TEMP_DIR/Dockerfile" "$REPO_DIR" $mounts
|
||||
set +x
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue