Skip to content

Commit 5a8bd65

Browse files
committed
🚀 feat: Complete Neural Nexus infrastructure setup
- Core Rust/Python structure - Docker orchestration with monitoring - Kubernetes manifests - CI/CD pipeline with GitHub Actions - Complete documentation suite - Edge device support (RPi, Jetson) - Security hardening and monitoring - Performance benchmarks and testing
1 parent ad6cdb4 commit 5a8bd65

86 files changed

Lines changed: 456 additions & 1000 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.neural-nexus-status

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
INTEGRATION_DATE=2025-10-10
2+
INTEGRATION_TIME=00:21:01
3+
GIT_BRANCH=main
4+
GIT_REMOTE=https://github.com/mechmind-dwv/core-system.git
5+
PROJECT_VERSION=0.1.0
6+
STATUS=READY

CONTRIBUTING.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# 🤝 Contribuir a Neural Nexus
2+
3+
¡Gracias por tu interés en contribuir a Neural Nexus!
4+
5+
## 📋 Código de Conducta
6+
7+
Por favor, sé respetuoso y constructivo en todas las interacciones.
8+
9+
## 🔧 Configurar Entorno de Desarrollo
10+
11+
```bash
12+
# Fork el repositorio en GitHub
13+
# Clonar tu fork
14+
git clone https://github.com/tu-usuario/core-system.git
15+
cd core-system
16+
17+
# Agregar upstream
18+
git remote add upstream https://github.com/mechmind-dwv/core-system.git
19+
20+
# Instalar dependencias de desarrollo
21+
make dev
22+
```
23+
24+
## 🌟 Proceso de Contribución
25+
26+
1. Crear un issue describiendo el cambio
27+
2. Crear una branch: `git checkout -b feature/mi-feature`
28+
3. Hacer commits siguiendo [Conventional Commits](https://www.conventionalcommits.org/)
29+
4. Escribir tests
30+
5. Ejecutar `make test`
31+
6. Push y crear Pull Request
32+
33+
## 📝 Convención de Commits
34+
35+
- `feat:` Nueva funcionalidad
36+
- `fix:` Corrección de bug
37+
- `docs:` Cambios en documentación
38+
- `style:` Formato, punto y coma faltantes, etc
39+
- `refactor:` Refactorización de código
40+
- `test:` Agregar tests
41+
- `chore:` Mantenimiento
42+
43+
## 🧪 Testing
44+
45+
```bash
46+
# Ejecutar todos los tests
47+
make test
48+
49+
# Tests específicos
50+
cargo test --package neural-nexus-core
51+
pytest tests/unit/
52+
```
53+
54+
## 📚 Documentación
55+
56+
Actualiza la documentación relevante en `docs/` cuando agregues nuevas features.
57+
58+
## ❓ Preguntas
59+
60+
Si tienes preguntas, abre un issue o únete a nuestro [Discord](https://discord.gg/neural-nexus).

QUICKSTART.md

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
# 🚀 Neural Nexus - Quick Start Guide
2+
3+
## Instalación Rápida
4+
5+
### 1. Clonar Repositorio
6+
```bash
7+
git clone https://github.com/mechmind-dwv/core-system.git
8+
cd core-system
9+
```
10+
11+
### 2. Configuración Inicial
12+
```bash
13+
# Copiar configuración de ejemplo
14+
cp .env.example .env
15+
16+
# Editar variables de entorno
17+
nano .env
18+
```
19+
20+
### 3. Desarrollo Local
21+
22+
#### Opción A: Docker (Recomendado)
23+
```bash
24+
# Levantar todos los servicios
25+
make docker-up
26+
27+
# Verificar servicios
28+
docker-compose ps
29+
30+
# Ver logs
31+
docker-compose logs -f neural-nexus-orchestrator
32+
```
33+
34+
#### Opción B: Desarrollo Nativo
35+
```bash
36+
# Crear entorno virtual
37+
python3 -m venv venv
38+
source venv/bin/activate
39+
40+
# Instalar dependencias
41+
make install
42+
43+
# Ejecutar orchestrator
44+
cargo run --bin neural-nexus-orchestrator
45+
46+
# En otra terminal: ejecutar node
47+
cargo run --bin neural-nexus-node
48+
```
49+
50+
### 4. Verificar Instalación
51+
```bash
52+
# Health check del orchestrator
53+
curl http://localhost:8080/health
54+
55+
# Métricas
56+
curl http://localhost:8080/metrics
57+
58+
# Lista de nodos
59+
curl http://localhost:8080/api/v1/nodes
60+
```
61+
62+
### 5. Despliegue en Edge Device
63+
64+
#### Raspberry Pi
65+
```bash
66+
# SSH a tu Raspberry Pi
67+
ssh pi@raspberrypi.local
68+
69+
# Ejecutar instalador
70+
curl -sSL https://install.neural-nexus.dev/rpi | bash
71+
72+
# O manualmente con Docker
73+
docker run -d --name neural-nexus-rpi \
74+
--restart unless-stopped \
75+
-v /opt/neural-nexus:/app/data \
76+
-p 8080:8080 \
77+
-e ORCHESTRATOR_URL=http://your-orchestrator:8080 \
78+
neuralnexus/raspberry-pi:latest
79+
```
80+
81+
#### NVIDIA Jetson
82+
```bash
83+
# Con GPU acceleration
84+
docker run -d --name neural-nexus-jetson \
85+
--runtime nvidia \
86+
--restart unless-stopped \
87+
-v /opt/neural-nexus:/app/data \
88+
-p 8080:8080 \
89+
-e GPU_ACCELERATION=true \
90+
neuralnexus/jetson:latest
91+
```
92+
93+
## Primeros Pasos
94+
95+
### Registrar un Nodo Edge
96+
```python
97+
import requests
98+
99+
response = requests.post('http://localhost:8080/api/v1/nodes/register', json={
100+
'node_id': 'my-edge-node-001',
101+
'node_type': 'raspberry-pi',
102+
'capabilities': ['inference', 'monitoring'],
103+
'hardware_info': {
104+
'cpu_cores': 4,
105+
'memory_mb': 4096,
106+
'gpu_available': False
107+
}
108+
})
109+
110+
print(response.json())
111+
```
112+
113+
### Ejecutar Inferencia
114+
```python
115+
import requests
116+
import numpy as np
117+
118+
# Preparar datos
119+
input_data = np.random.randn(1, 3, 224, 224).tolist()
120+
121+
# Enviar request
122+
response = requests.post('http://localhost:8080/api/v1/inference', json={
123+
'model_name': 'resnet50',
124+
'input_data': input_data,
125+
'priority': 5
126+
})
127+
128+
result = response.json()
129+
print(f"Inferencia completada en {result['processing_time_ms']}ms")
130+
print(f"Outputs: {result['outputs']}")
131+
```
132+
133+
### Monitorear Métricas
134+
```bash
135+
# Acceder a Grafana
136+
open http://localhost:3000
137+
138+
# Usuario: admin
139+
# Contraseña: neural_nexus_admin
140+
141+
# Dashboards pre-configurados:
142+
# - Sistema Overview
143+
# - Node Performance
144+
# - Inference Metrics
145+
# - Resource Usage
146+
```
147+
148+
## Troubleshooting
149+
150+
### Problema: Servicios no arrancan
151+
```bash
152+
# Verificar logs
153+
docker-compose logs
154+
155+
# Reiniciar servicios
156+
make docker-down
157+
make docker-up
158+
159+
# Verificar puertos
160+
sudo netstat -tulpn | grep -E '8080|50051|5432|6379|1883'
161+
```
162+
163+
### Problema: Nodo no se conecta al orchestrator
164+
```bash
165+
# Verificar conectividad
166+
ping orchestrator-hostname
167+
168+
# Verificar variables de entorno
169+
echo $ORCHESTRATOR_URL
170+
171+
# Ver logs del nodo
172+
docker logs neural-nexus-node
173+
```
174+
175+
### Problema: Alta latencia en inferencia
176+
```bash
177+
# Verificar uso de recursos
178+
docker stats
179+
180+
# Optimizar configuración
181+
# Editar config/node.toml
182+
[inference.optimization]
183+
quantization.enabled = true
184+
batching.max_batch_size = 16
185+
```
186+
187+
## Recursos Adicionales
188+
189+
- 📖 [Documentación Completa](docs/)
190+
- 🏗️ [Arquitectura del Sistema](docs/ARCHITECTURE.md)
191+
- 🚀 [Guía de Despliegue](docs/DEPLOYMENT_GUIDE.md)
192+
- 🔌 [API Reference](docs/API_REFERENCE.md)
193+
- 🤝 [Guía de Contribución](CONTRIBUTING.md)
194+
- 💬 [Discord Community](https://discord.gg/neural-nexus)
195+
196+
## Siguientes Pasos
197+
198+
1. ✅ Configurar tu primer nodo edge
199+
2. ✅ Cargar tu primer modelo ML
200+
3. ✅ Ejecutar inferencias
201+
4. ✅ Monitorear métricas en Grafana
202+
5. ✅ Escalar horizontalmente con Kubernetes
203+
6. ✅ Implementar aprendizaje federado
204+
7. ✅ Contribuir al proyecto
205+
206+
---
207+
208+
> 🧠⚡ **¡Bienvenido a Neural Nexus!** El futuro del Edge Computing distribuido está en tus manos.

scripts/update.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
# 🔄 Neural Nexus - Update Script
3+
4+
echo "🔄 Actualizando Neural Nexus..."
5+
6+
# Pull latest changes
7+
git pull origin main
8+
9+
# Update dependencies
10+
echo "📦 Actualizando dependencias..."
11+
pip install -r requirements.txt --upgrade
12+
cargo update
13+
14+
# Rebuild
15+
echo "🏗️ Reconstruyendo proyecto..."
16+
make build
17+
18+
# Restart services
19+
echo "🔄 Reiniciando servicios..."
20+
make docker-down
21+
make docker-up
22+
23+
echo "✅ Actualización completada"

venv/lib/python3.12/site-packages/grpc/__init__.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,9 @@ def add_generic_rpc_handlers(self, generic_rpc_handlers):
14541454
"""
14551455
raise NotImplementedError()
14561456

1457-
def add_registered_method_handlers(self, service_name, method_handlers):
1457+
def add_registered_method_handlers( # noqa: B027
1458+
self, service_name, method_handlers
1459+
):
14581460
"""Registers GenericRpcHandlers with this Server.
14591461
14601462
This method is only safe to call before the server is started.
@@ -1838,14 +1840,13 @@ def ssl_server_credentials(
18381840
object is an argument to add_secure_port() method during server setup.
18391841
"""
18401842
if not private_key_certificate_chain_pairs:
1841-
raise ValueError(
1843+
error_msg = (
18421844
"At least one private key-certificate chain pair is required!"
18431845
)
1846+
raise ValueError(error_msg)
18441847
elif require_client_auth and root_certificates is None:
1845-
raise ValueError(
1846-
"Illegal to require client auth without providing root"
1847-
" certificates!"
1848-
)
1848+
error_msg = "Illegal to require client auth without providing root certificates!"
1849+
raise ValueError(error_msg)
18491850
else:
18501851
return ServerCredentials(
18511852
_cygrpc.server_credentials_ssl(
@@ -1910,9 +1911,10 @@ def ssl_server_certificate_configuration(
19101911
)
19111912
)
19121913
else:
1913-
raise ValueError(
1914+
error_msg = (
19141915
"At least one private key-certificate chain pair is required!"
19151916
)
1917+
raise ValueError(error_msg)
19161918

19171919

19181920
def dynamic_ssl_server_credentials(
@@ -2038,6 +2040,7 @@ def alts_channel_credentials(service_accounts=None):
20382040
peer identity of the server, handshake will fail. The arg can be empty
20392041
if the client does not have any information about trusted server
20402042
identity.
2043+
20412044
Returns:
20422045
A ChannelCredentials for use with an ALTS-enabled Channel
20432046
"""
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)