lemm-test-100 / pre_startup.sh
Gamahea
Deploy Music Generation Studio - 2025-12-12 16:01
aad9d66
raw
history blame
1.09 kB
#!/bin/bash
# Pre-startup script for HuggingFace Spaces
# This runs before the main application
echo "πŸš€ Initializing Music Generation Studio..."
# Verify espeak-ng installation
if command -v espeak-ng &> /dev/null; then
echo "βœ… espeak-ng is installed"
espeak-ng --version
else
echo "❌ espeak-ng not found"
exit 1
fi
# Verify ffmpeg
if command -v ffmpeg &> /dev/null; then
echo "βœ… ffmpeg is installed"
ffmpeg -version | head -1
else
echo "❌ ffmpeg not found"
fi
# Create necessary directories
mkdir -p outputs/music
mkdir -p outputs/mixed
mkdir -p models
mkdir -p logs
echo "βœ… Directories created"
# Check Python version
python --version
# Verify key dependencies
echo "πŸ“¦ Verifying Python packages..."
python -c "import torch; print(f'βœ… PyTorch {torch.__version__}')" || echo "❌ PyTorch not found"
python -c "import gradio; print(f'βœ… Gradio {gradio.__version__}')" || echo "❌ Gradio not found"
python -c "import phonemizer; print('βœ… phonemizer OK')" || echo "❌ phonemizer not found"
echo "βœ… Pre-startup checks complete"