File size: 2,412 Bytes
bc9c261 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# Simplest SkyPilot test - just validates provisioning and basic setup
name: test-simple
resources:
use_spot: true
cpus: 2+ # CPU only to avoid GPU quota issues
memory: 8+
disk_size: 30
setup: |
echo "=================================================="
echo "π§ͺ SIMPLE SKYPILOT TEST"
echo "=================================================="
echo ""
# Machine info
echo "π Machine Info:"
echo " Hostname: $(hostname)"
echo " CPU cores: $(nproc)"
echo " Memory: $(free -h | grep Mem | awk '{print $2}')"
echo ""
# Install Python deps
echo "π¦ Installing dependencies..."
pip install -q numpy soundfile librosa
echo " β Installed: numpy, soundfile, librosa"
echo ""
# Clone repo
echo "π₯ Cloning repository..."
git clone -q https://huggingface.co/marcosremar2/ensemble-tts-annotation
echo " β Repository cloned"
echo ""
echo "β
Setup complete!"
run: |
cd ensemble-tts-annotation
echo ""
echo "=================================================="
echo "π§ͺ RUNNING TESTS"
echo "=================================================="
echo ""
# Check files
echo "π Checking key files..."
for file in README.md QUICK_START_SKYPILOT.md ensemble_tts/__init__.py; do
if [ -f "$file" ]; then
echo " β $file"
else
echo " β $file MISSING"
fi
done
echo ""
# Test Python imports
echo "π Testing Python imports..."
python3 -c "import numpy; import soundfile; import librosa; print(' β All imports work')"
echo ""
# Generate 1 test audio
echo "π΅ Generating test audio..."
python3 scripts/data/create_synthetic_test_data.py --output test_tmp --samples 1
echo ""
# Count files
AUDIO_COUNT=$(find test_tmp -name "*.wav" | wc -l)
echo "π Created $AUDIO_COUNT audio files"
if [ "$AUDIO_COUNT" -eq 7 ]; then
echo " β Expected 7 files - CORRECT"
else
echo " β Expected 7 but got $AUDIO_COUNT"
fi
echo ""
# Cleanup
rm -rf test_tmp
echo "=================================================="
echo "β
ALL TESTS PASSED!"
echo "=================================================="
echo ""
echo "π SkyPilot successfully:"
echo " β Provisioned machine"
echo " β Installed dependencies"
echo " β Cloned repository"
echo " β Generated synthetic audio"
echo ""
echo "π° Cost: ~\$0.05 for this test"
echo ""
|