Spaces:
Runtime error
Runtime error
Upload skypilot.yaml with huggingface_hub
Browse files- skypilot.yaml +72 -0
skypilot.yaml
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SkyPilot YAML — PARLE Light Pipeline
|
| 2 |
+
# Qwen 0.5B + gTTS (minimal VRAM)
|
| 3 |
+
#
|
| 4 |
+
# Usage:
|
| 5 |
+
# sky launch -c parle-light skypilot.yaml --cloud vast --gpus RTX3090:1 -i 5 --down -y
|
| 6 |
+
# sky launch -c parle-light skypilot.yaml --cloud runpod --gpus A4000:1 -i 5 --down -y
|
| 7 |
+
#
|
| 8 |
+
# Stack:
|
| 9 |
+
# STT: Faster Whisper Small (CUDA float16) — ~460MB VRAM
|
| 10 |
+
# LLM: Qwen2.5-0.5B-Instruct (float16) — ~1GB VRAM
|
| 11 |
+
# TTS: gTTS (Google API, zero GPU)
|
| 12 |
+
#
|
| 13 |
+
# Total VRAM: ~1.5 GB (runs on any GPU)
|
| 14 |
+
# Cold start: ~3–5 min
|
| 15 |
+
|
| 16 |
+
resources:
|
| 17 |
+
cloud: vast
|
| 18 |
+
accelerators: RTX3090:1
|
| 19 |
+
disk_size: 50
|
| 20 |
+
memory: 16+
|
| 21 |
+
use_spot: true
|
| 22 |
+
ports:
|
| 23 |
+
- 8000 # FastAPI server (HTTP/SSE + WebSocket)
|
| 24 |
+
|
| 25 |
+
envs:
|
| 26 |
+
HF_TOKEN: null
|
| 27 |
+
|
| 28 |
+
setup: |
|
| 29 |
+
set -e
|
| 30 |
+
|
| 31 |
+
echo "=== Cloning PARLE Light from HuggingFace ==="
|
| 32 |
+
if [ -n "$HF_TOKEN" ]; then
|
| 33 |
+
git clone https://hf-user:${HF_TOKEN}@huggingface.co/spaces/marcosremar2/parle-s2s-light ~/parle-speech
|
| 34 |
+
else
|
| 35 |
+
git clone https://huggingface.co/spaces/marcosremar2/parle-s2s-light ~/parle-speech
|
| 36 |
+
fi
|
| 37 |
+
|
| 38 |
+
echo "=== Installing system dependencies ==="
|
| 39 |
+
sudo apt-get update -qq
|
| 40 |
+
sudo apt-get install -y -qq ffmpeg libsndfile1 python3-pip git
|
| 41 |
+
|
| 42 |
+
echo "=== Installing Python dependencies ==="
|
| 43 |
+
cd ~/parle-speech
|
| 44 |
+
|
| 45 |
+
pip install --upgrade pip setuptools wheel
|
| 46 |
+
|
| 47 |
+
# PyTorch with CUDA
|
| 48 |
+
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
|
| 49 |
+
|
| 50 |
+
# Install all requirements
|
| 51 |
+
pip install -r requirements.txt
|
| 52 |
+
|
| 53 |
+
# Download models (~2 GB total)
|
| 54 |
+
echo "=== Downloading models ==="
|
| 55 |
+
python3 ~/parle-speech/download_models.py
|
| 56 |
+
|
| 57 |
+
echo "=== Setup complete ==="
|
| 58 |
+
|
| 59 |
+
run: |
|
| 60 |
+
set -e
|
| 61 |
+
|
| 62 |
+
cd ~/parle-speech
|
| 63 |
+
|
| 64 |
+
echo "=== Starting PARLE Light Server ==="
|
| 65 |
+
echo "Endpoint: http://$(curl -s ifconfig.me):8000"
|
| 66 |
+
echo "Health: GET http://$(curl -s ifconfig.me):8000/health"
|
| 67 |
+
|
| 68 |
+
uvicorn app:app \
|
| 69 |
+
--host 0.0.0.0 \
|
| 70 |
+
--port 8000 \
|
| 71 |
+
--workers 1 \
|
| 72 |
+
--log-level info
|