Skip to content

Commit

Permalink
add build params and co update
Browse files Browse the repository at this point in the history
  • Loading branch information
VladOS95-cyber committed Dec 16, 2024
1 parent 12858d6 commit 89aadb7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions docs/source/distributions/building_distro.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
13 changes: 7 additions & 6 deletions llama_stack/distribution/build_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <build_name> <docker_base> <pip_dependencies> [<special_pip_deps>]" >&2
echo "Example: $0 my-fastapi-app python:3.9-slim 'fastapi uvicorn' " >&2
if [ "$#" -lt 5 ]; then
echo "Usage: $0 <build_name> <docker_base> <platform> <pip_dependencies> [<special_pip_deps>]" >&2
echo "Example: $0 my-fastapi-app python:3.9-slim linux/arm64 'fastapi uvicorn' " >&2
exit 1
fi

Expand All @@ -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'
Expand Down

0 comments on commit 89aadb7

Please sign in to comment.