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 ""