mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-12 04:00:42 +00:00
added platform for docker image
This commit is contained in:
parent
c4d5d6bb91
commit
0c75f2cf31
4 changed files with 24 additions and 8 deletions
|
|
@ -5,7 +5,7 @@ LLAMA_STACK_DIR=${LLAMA_STACK_DIR:-}
|
|||
TEST_PYPI_VERSION=${TEST_PYPI_VERSION:-}
|
||||
|
||||
if [ "$#" -lt 4 ]; then
|
||||
echo "Usage: $0 <build_name> <docker_base> <pip_dependencies> [<special_pip_deps>]" >&2
|
||||
echo "Usage: $0 <build_name> <docker_base> <platform> <pip_dependencies> [<special_pip_deps>]" >&2
|
||||
echo "Example: $0 my-fastapi-app python:3.9-slim 'fastapi uvicorn' " >&2
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -17,9 +17,10 @@ set -euo pipefail
|
|||
build_name="$1"
|
||||
image_name="llamastack-$build_name"
|
||||
docker_base=$2
|
||||
build_file_path=$3
|
||||
host_build_dir=$4
|
||||
pip_dependencies=$5
|
||||
platform=$3
|
||||
build_file_path=$4
|
||||
host_build_dir=$5
|
||||
pip_dependencies=$6
|
||||
|
||||
# Define color codes
|
||||
RED='\033[0;31m'
|
||||
|
|
@ -133,7 +134,7 @@ if command -v selinuxenabled &> /dev/null && selinuxenabled; then
|
|||
fi
|
||||
|
||||
set -x
|
||||
$DOCKER_BINARY build $DOCKER_OPTS -t $image_name -f "$TEMP_DIR/Dockerfile" "$REPO_DIR" $mounts
|
||||
$DOCKER_BINARY build --platform "$platform" $DOCKER_OPTS -t $image_name -f "$TEMP_DIR/Dockerfile" "$REPO_DIR" $mounts
|
||||
|
||||
# clean up tmp/configs
|
||||
rm -rf $REPO_CONFIGS_DIR
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue