mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 19:04:19 +00:00
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_MODELS_DIR=${LLAMA_MODELS_DIR:-}
|
||||||
LLAMA_STACK_DIR=${LLAMA_STACK_DIR:-}
|
LLAMA_STACK_DIR=${LLAMA_STACK_DIR:-}
|
||||||
TEST_PYPI_VERSION=${TEST_PYPI_VERSION:-}
|
TEST_PYPI_VERSION=${TEST_PYPI_VERSION:-}
|
||||||
|
BUILD_PLATFORM=${BUILD_PLATFORM:-}
|
||||||
|
|
||||||
if [ "$#" -lt 4 ]; then
|
if [ "$#" -lt 4 ]; then
|
||||||
echo "Usage: $0 <build_name> <docker_base> <pip_dependencies> [<special_pip_deps>]" >&2
|
echo "Usage: $0 <build_name> <docker_base> <pip_dependencies> [<special_pip_deps>]" >&2
|
||||||
|
@ -77,6 +78,10 @@ if [ -n "$special_pip_deps" ]; then
|
||||||
done
|
done
|
||||||
fi
|
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"
|
stack_mount="/app/llama-stack-source"
|
||||||
models_mount="/app/llama-models-source"
|
models_mount="/app/llama-models-source"
|
||||||
|
|
||||||
|
@ -116,7 +121,6 @@ RUN pip install --no-cache $models_mount
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
add_to_docker <<EOF
|
add_to_docker <<EOF
|
||||||
|
|
||||||
# This would be good in production but for debugging flexibility lets not add it right now
|
# 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
|
# Detect platform architecture
|
||||||
ARCH=$(uname -m)
|
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"
|
PLATFORM="--platform linux/arm64"
|
||||||
elif [ "$ARCH" = "x86_64" ]; then
|
elif [ "$ARCH" = "x86_64" ]; then
|
||||||
PLATFORM="--platform linux/amd64"
|
PLATFORM="--platform linux/amd64"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue