mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 19:04:19 +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
|
# save build.yaml spec for building same distribution again
|
||||||
if build_config.image_type == ImageType.docker.value:
|
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
|
# 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 = (
|
build_dir = (
|
||||||
llama_stack_path / "configs/distributions" / build_config.image_type
|
llama_stack_path / "tmp/configs/"
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
build_dir = (
|
build_dir = (
|
||||||
|
|
|
@ -103,7 +103,7 @@ add_to_docker <<EOF
|
||||||
|
|
||||||
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"
|
printf "Dockerfile created successfully in $TEMP_DIR/Dockerfile"
|
||||||
cat $TEMP_DIR/Dockerfile
|
cat $TEMP_DIR/Dockerfile
|
||||||
|
@ -116,6 +116,7 @@ fi
|
||||||
if [ -n "$LLAMA_MODELS_DIR" ]; then
|
if [ -n "$LLAMA_MODELS_DIR" ]; then
|
||||||
mounts="$mounts -v $(readlink -f $LLAMA_MODELS_DIR):$models_mount"
|
mounts="$mounts -v $(readlink -f $LLAMA_MODELS_DIR):$models_mount"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
$DOCKER_BINARY build $DOCKER_OPTS -t $image_name -f "$TEMP_DIR/Dockerfile" "$REPO_DIR" $mounts
|
$DOCKER_BINARY build $DOCKER_OPTS -t $image_name -f "$TEMP_DIR/Dockerfile" "$REPO_DIR" $mounts
|
||||||
set +x
|
set +x
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue