120 lines
2.5 KiB
Markdown
120 lines
2.5 KiB
Markdown
# GRACE - Despliegue en RunPod
|
|
|
|
## Estado Actual
|
|
|
|
| Componente | Estado |
|
|
|------------|--------|
|
|
| Endpoint ID | `r00x4g3rrwkbyh` |
|
|
| Template ID | `16zimxx2xj` |
|
|
| Nombre | grace-gpu |
|
|
| GPU | RTX 4090 |
|
|
| Balance | $73+ |
|
|
| Imagen | PENDIENTE |
|
|
|
|
## Problema
|
|
|
|
El template usa la imagen base `runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04` sin el handler de GRACE. Necesita imagen custom.
|
|
|
|
## Solucion: Build y Push Docker Image
|
|
|
|
### Opcion 1: Build Local
|
|
|
|
```bash
|
|
# En maquina con Docker
|
|
cd grace/runpod
|
|
|
|
# Build
|
|
docker build -t tzzrsystems/grace:latest .
|
|
|
|
# Login a DockerHub
|
|
docker login
|
|
|
|
# Push
|
|
docker push tzzrsystems/grace:latest
|
|
```
|
|
|
|
### Opcion 2: GitHub Actions (Recomendado)
|
|
|
|
Crear `.github/workflows/build-grace.yml`:
|
|
|
|
```yaml
|
|
name: Build GRACE Docker
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths: ['runpod/**']
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Build and Push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./runpod
|
|
push: true
|
|
tags: tzzrsystems/grace:latest
|
|
```
|
|
|
|
## Actualizar Template en RunPod
|
|
|
|
Una vez la imagen este en DockerHub:
|
|
|
|
```bash
|
|
curl -X POST "https://api.runpod.io/graphql" \
|
|
-H "Content-Type: application/json" \
|
|
-H "Authorization: Bearer YOUR_API_KEY" \
|
|
-d '{
|
|
"query": "mutation { saveTemplate(input: { id: \"16zimxx2xj\", imageName: \"tzzrsystems/grace:latest\" }) { id imageName } }"
|
|
}'
|
|
```
|
|
|
|
## Verificar Funcionamiento
|
|
|
|
```bash
|
|
# Test EMBEDDINGS (mas rapido)
|
|
curl -X POST "https://api.runpod.ai/v2/r00x4g3rrwkbyh/runsync" \
|
|
-H "Authorization: Bearer YOUR_API_KEY" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"input": {
|
|
"contract_version": "2.1",
|
|
"routing": {"module": "EMBEDDINGS"},
|
|
"payload": {"type": "text", "encoding": "utf-8", "content": "Test"},
|
|
"context": {}
|
|
}
|
|
}'
|
|
```
|
|
|
|
## Modulos Disponibles
|
|
|
|
| Modulo | Uso | Modelo |
|
|
|--------|-----|--------|
|
|
| ASR_ENGINE | Audio -> Texto | Whisper Large V3 |
|
|
| OCR_CORE | Imagen -> Texto | GOT-OCR 2.0 |
|
|
| TTS | Texto -> Audio | XTTS-v2 |
|
|
| EMBEDDINGS | Texto -> Vector | BGE-Large |
|
|
| FACE_VECTOR | Imagen -> Vector facial | InsightFace |
|
|
| AVATAR_GEN | Prompt -> Imagen | SDXL |
|
|
|
|
## Estimacion de Costos
|
|
|
|
RTX 4090: ~$0.44/hora
|
|
- Cold start: 2-4 min
|
|
- Idle timeout: 10 seg
|
|
|
|
Con minWorkers=0 solo pagas por uso real.
|
|
|
|
---
|
|
|
|
*Documentacion generada 2025-12-24*
|