Files
runpod/scripts/install.sh

51 lines
1.0 KiB
Bash
Raw Normal View History

#!/bin/bash
#
# Install AI Infrastructure
# Wrapper script for Ansible playbook
#
# Usage:
# ./install.sh # Full installation
# ./install.sh --tags base # Install specific components
#
set -e
cd "$(dirname "$0")/.."
echo "========================================="
echo " RunPod AI Infrastructure Installation"
echo "========================================="
echo ""
# Check if Ansible is installed
if ! command -v ansible-playbook &> /dev/null; then
echo "Ansible not found. Installing..."
sudo apt update
sudo apt install -y ansible
fi
# Check for .env file
if [ ! -f .env ]; then
echo "Warning: .env file not found"
echo "Copy .env.example to .env and add your HF_TOKEN"
echo ""
fi
# Source .env if it exists
if [ -f .env ]; then
set -a
source .env
set +a
fi
# Run Ansible playbook
echo "Running Ansible playbook..."
echo ""
ansible-playbook playbook.yml "$@"
echo ""
echo "========================================="
echo " Installation complete!"
echo "========================================="