Elffuss BraidHub

kikocis/llama-stack public

main · 771 B · executableRawPermalink
1#!/bin/bash
2
3# Copyright (c) Meta Platforms, Inc. and affiliates.
4# All rights reserved.
5#
6# This source code is licensed under the terms described in the LICENSE file in
7# the root directory of this source tree.
8
9DOCKER_BINARY=${DOCKER_BINARY:-docker}
10DOCKER_OPTS=${DOCKER_OPTS:-}
11
12set -euo pipefail
13
14error_handler() {
15 echo "Error occurred in script at line: ${1}" >&2
16 exit 1
17}
18
19trap 'error_handler ${LINENO}' ERR
20
21if [ $# -lt 2 ]; then
22 echo "Usage: $0 <container name> <build file path>"
23 exit 1
24fi
25
26docker_image="$1"
27host_build_dir="$2"
28container_build_dir="/app/builds"
29
30set -x
31$DOCKER_BINARY run $DOCKER_OPTS -it \
32 -v $host_build_dir:$container_build_dir \
33 $docker_image \
34 llama stack configure ./llamastack-build.yaml --output-dir $container_build_dir