Elffuss BraidHub

kikocis/llama-stack public

5498ce93bcd1 · 807 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
9set -euo pipefail
10
11RED='\033[0;31m'
12NC='\033[0m' # No Color
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 3 ]; then
22 echo "Usage: $0 <build_name> <yaml_config> <port> <other_args...>"
23 exit 1
24fi
25
26build_name="$1"
27docker_image="llamastack-$build_name"
28shift
29
30yaml_config="$1"
31shift
32
33port="$1"
34shift
35
36set -x
37podman run -it \
38 -p $port:$port \
39 -v "$yaml_config:/app/config.yaml" \
40 $docker_image \
41 python -m llama_stack.distribution.server.server \
42 --yaml_config /app/config.yaml \
43 --port $port "$@"