Elffuss BraidHub

kikocis/llama-stack public

bb9be718c121 · 915 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
9PYTHONPATH=${PYTHONPATH:-}
10THIS_DIR="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)"
11
12set -euo pipefail
13
14missing_packages=()
15
16check_package() {
17 if ! pip show "$1" &>/dev/null; then
18 missing_packages+=("$1")
19 fi
20}
21
22if [ ${#missing_packages[@]} -ne 0 ]; then
23 echo "Error: The following package(s) are not installed:"
24 printf " - %s\n" "${missing_packages[@]}"
25 echo "Please install them using:"
26 echo "pip install ${missing_packages[*]}"
27 exit 1
28fi
29
30stack_dir=$(dirname $(dirname $THIS_DIR))
31models_dir=$(dirname $stack_dir)/llama-models
32PYTHONPATH=$PYTHONPATH:$stack_dir:$models_dir python -m docs.openapi_generator.generate $(dirname $THIS_DIR)/resources