forked from phoenix-oss/llama-stack-mirror
add explicit platform
This commit is contained in:
parent
218803b7c8
commit
36da9a600e
1 changed files with 12 additions and 1 deletions
|
@ -147,8 +147,19 @@ else
|
||||||
image_name="$image_name-$(curl -s $URL | jq -r '.info.version')"
|
image_name="$image_name-$(curl -s $URL | jq -r '.info.version')"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Detect platform architecture
|
||||||
|
ARCH=$(uname -m)
|
||||||
|
if [ "$ARCH" = "arm64" ] || [ "$ARCH" = "aarch64" ]; then
|
||||||
|
PLATFORM="--platform linux/arm64"
|
||||||
|
elif [ "$ARCH" = "x86_64" ]; then
|
||||||
|
PLATFORM="--platform linux/amd64"
|
||||||
|
else
|
||||||
|
echo "Unsupported architecture: $ARCH"
|
||||||
|
exit 1
|
||||||
|
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 $PLATFORM -t $image_name -f "$TEMP_DIR/Dockerfile" "$REPO_DIR" $mounts
|
||||||
|
|
||||||
# clean up tmp/configs
|
# clean up tmp/configs
|
||||||
set +x
|
set +x
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue