#!/bin/bash

set -e

echo "🔧 Updating packages..."
apt update && apt install -y ffmpeg git

echo "🐍 Installing Python packages..."
pip install --upgrade pip

# Установка PyTorch под CUDA 12.1 (если шаблон Runpod Pytorch 2.2.0)
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

# WhisperX и зависимости
pip install whisperx yt-dlp tqdm

# Для диаризации
pip install pyannote.audio

echo "✅ Setup completed. You can now use WhisperX with diarization!"


