forked from phoenix-oss/llama-stack-mirror
Updates to docker build script
This commit is contained in:
parent
39e99b39fe
commit
c46b462c22
1 changed files with 8 additions and 2 deletions
|
@ -9,6 +9,7 @@
|
|||
LLAMA_MODELS_DIR=${LLAMA_MODELS_DIR:-}
|
||||
LLAMA_STACK_DIR=${LLAMA_STACK_DIR:-}
|
||||
TEST_PYPI_VERSION=${TEST_PYPI_VERSION:-}
|
||||
BUILD_PLATFORM=${BUILD_PLATFORM:-}
|
||||
|
||||
if [ "$#" -lt 4 ]; then
|
||||
echo "Usage: $0 <build_name> <docker_base> <pip_dependencies> [<special_pip_deps>]" >&2
|
||||
|
@ -77,6 +78,10 @@ if [ -n "$special_pip_deps" ]; then
|
|||
done
|
||||
fi
|
||||
|
||||
# This has been added to simplify UI development, but we likely need
|
||||
# to add this as a dependency to `llama-stack` itself
|
||||
add_to_docker "RUN pip install llama-stack-client"
|
||||
|
||||
stack_mount="/app/llama-stack-source"
|
||||
models_mount="/app/llama-models-source"
|
||||
|
||||
|
@ -116,7 +121,6 @@ RUN pip install --no-cache $models_mount
|
|||
EOF
|
||||
fi
|
||||
|
||||
|
||||
add_to_docker <<EOF
|
||||
|
||||
# This would be good in production but for debugging flexibility lets not add it right now
|
||||
|
@ -158,7 +162,9 @@ image_tag="$image_name:$version_tag"
|
|||
|
||||
# Detect platform architecture
|
||||
ARCH=$(uname -m)
|
||||
if [ "$ARCH" = "arm64" ] || [ "$ARCH" = "aarch64" ]; then
|
||||
if [ -n "$BUILD_PLATFORM" ]; then
|
||||
PLATFORM="--platform $BUILD_PLATFORM"
|
||||
elif [ "$ARCH" = "arm64" ] || [ "$ARCH" = "aarch64" ]; then
|
||||
PLATFORM="--platform linux/arm64"
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
PLATFORM="--platform linux/amd64"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue