From 89aadb793ae0f9a4a524678924ae72ca67869a1f Mon Sep 17 00:00:00 2001 From: Vladislav Date: Mon, 16 Dec 2024 18:23:11 +0100 Subject: [PATCH] add build params and co update --- docs/source/distributions/building_distro.md | 2 ++ llama_stack/distribution/build_container.sh | 13 +++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/source/distributions/building_distro.md b/docs/source/distributions/building_distro.md index 67d39159c..3c375a950 100644 --- a/docs/source/distributions/building_distro.md +++ b/docs/source/distributions/building_distro.md @@ -20,6 +20,7 @@ llama stack build -h We will start build our distribution (in the form of a Conda environment, or Docker image). In this step, we will specify: - `name`: the name for our distribution (e.g. `my-stack`) - `image_type`: our build image type (`conda | docker`) +- `platform`: the platform for docker image (e.g. `linux/arm64`) - `distribution_spec`: our distribution specs for specifying API providers - `description`: a short description of the configurations for the distribution - `providers`: specifies the underlying implementation for serving each API endpoint @@ -36,6 +37,7 @@ llama stack build > Enter a name for your Llama Stack (e.g. my-local-stack): my-stack > Enter the image type you want your Llama Stack to be built as (docker or conda): conda +> Enter the target platform you want your Llama Stack to be built for: linux/arm64 Llama Stack is composed of several APIs working together. Let's select the provider types (implementations) you want to use for these APIs. diff --git a/llama_stack/distribution/build_container.sh b/llama_stack/distribution/build_container.sh index a9aee8f14..8824ef92c 100755 --- a/llama_stack/distribution/build_container.sh +++ b/llama_stack/distribution/build_container.sh @@ -11,9 +11,9 @@ LLAMA_STACK_DIR=${LLAMA_STACK_DIR:-} TEST_PYPI_VERSION=${TEST_PYPI_VERSION:-} BUILD_PLATFORM=${BUILD_PLATFORM:-} -if [ "$#" -lt 4 ]; then - echo "Usage: $0 []" >&2 - echo "Example: $0 my-fastapi-app python:3.9-slim 'fastapi uvicorn' " >&2 +if [ "$#" -lt 5 ]; then + echo "Usage: $0 []" >&2 + echo "Example: $0 my-fastapi-app python:3.9-slim linux/arm64 'fastapi uvicorn' " >&2 exit 1 fi @@ -24,9 +24,10 @@ set -euo pipefail build_name="$1" image_name="distribution-$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'