|
#!/bin/bash |
|
|
|
|
|
|
|
|
|
|
|
echo |
|
pwd |
|
|
|
|
|
|
|
if [ ! -f "enterprise/enterprise_ui/enterprise_colors.json" ]; then |
|
echo "Admin UI - using default LiteLLM UI" |
|
exit 0 |
|
fi |
|
|
|
echo "Building Custom Admin UI..." |
|
|
|
|
|
|
|
if [[ "$(uname)" == "Darwin" ]]; then |
|
|
|
if ! command -v brew &> /dev/null; then |
|
echo "Error: Homebrew not found. Please install Homebrew and try again." |
|
exit 1 |
|
fi |
|
brew update |
|
brew install curl |
|
else |
|
|
|
if command -v apt-get &> /dev/null; then |
|
apt-get update |
|
apt-get install -y curl |
|
elif command -v apk &> /dev/null; then |
|
|
|
apk update |
|
apk add curl |
|
else |
|
echo "Error: Unsupported package manager. Cannot install dependencies." |
|
exit 1 |
|
fi |
|
fi |
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash |
|
source ~/.nvm/nvm.sh |
|
nvm install v18.17.0 |
|
nvm use v18.17.0 |
|
npm install -g npm |
|
|
|
|
|
cp enterprise/enterprise_ui/enterprise_colors.json ui/litellm-dashboard/ui_colors.json |
|
|
|
|
|
cd ui/litellm-dashboard |
|
|
|
|
|
chmod +x ./build_ui.sh |
|
|
|
|
|
./build_ui.sh |
|
|
|
|
|
cd ../.. |