#!/bin/bash set -euo pipefail echo "πŸ”¨ Building all Docker images and pushing..." for app in ../spaces/*; do appname=$(basename "$app") docker build -t ghcr.io/agentcyone/$appname:latest "$app" docker push ghcr.io/agentcyone/$appname:latest done echo "πŸš€ Deploying Helm charts..." for app in ../helm_charts/*; do appname=$(basename "$app") helm upgrade --install $appname "$app" --namespace totality --create-namespace done echo "βœ… Build and deploy complete." apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: totality-ingress namespace: totality annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: rules: - http: paths: {{- range $app := (list "space_app_1" "space_app_2") }} - path: /api/{{ $app }} pathType: Prefix backend: service: name: {{ $app }}-service port: number: 80 {{- end }} apiVersion: apps/v1 kind: Deployment metadata: name: prometheus namespace: totality spec: replicas: 1 selector: matchLabels: app: prometheus template: metadata: labels: app: prometheus spec: containers: - name: prometheus image: prom/prometheus:latest ports: - containerPort: 9090 volumeMounts: - mountPath: /etc/prometheus name: config volumes: - name: config configMap: name: prometheus-config --- apiVersion: v1 kind: Service metadata: name: prometheus namespace: totality spec: type: ClusterIP ports: - port: 9090 selector: app: prometheus name: Totality Spaces CI/CD on: push: branches: [main] pull_request: branches: [main] env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} jobs: build-and-deploy: runs-on: ubuntu-latest permissions: contents: read packages: write steps: - name: Checkout code uses: actions/checkout@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Login to GitHub Container Registry uses: docker/login-action@v2 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push images run: | for app in spaces/*; do appname=$(basename "$app") echo "Building $appname..." docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/$appname:latest $app docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/$appname:latest done - name: Set up Helm uses: azure/setup-helm@v3 with: version: 'v3.11.1' - name: Deploy to Kubernetes run: | for app in helm_charts/*; do appname=$(basename "$app") echo "Deploying $appname..." helm upgrade --install $appname $app \ --namespace totality \ --create-namespace \ --wait \ --timeout 5m done - name: Verify deployments run: | kubectl get pods -n totality # Default values for space_app_1 replicaCount: 2 image: repository: ghcr.io/agentcyone/space_app_1 tag: latest pullPolicy: IfNotPresent service: type: ClusterIP port: 80 targetPort: 7860 annotations: {} ingress: enabled: false className: "" annotations: {} hosts: - host: chart-example.local paths: - path: / pathType: ImplementationSpecific tls: [] resources: requests: cpu: 250m memory: 512Mi limits: cpu: 500m memory: 1Gi autoscaling: enabled: true minReplicas: 2 maxReplicas: 10 targetCPUUtilizationPercentage: 50 targetMemoryUtilizationPercentage: 50 nodeSelector: {} tolerations: [] affinity: {} # Generic Dockerfile template for Spaces applications FROM python:3.10-slim WORKDIR /app # Install dependencies first for better caching COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application code COPY . . # Expose default Gradio port EXPOSE 7860 # Health check HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ CMD curl -f http://localhost:7860/ || exit 1 # Run the application CMD ["python", "app.py"] # Totality SaaS Platform Enterprise-grade mathematical knowledge platform with scalable deployment architecture. ## Features - Dockerized Spaces applications - Helm charts for Kubernetes deployment - CI/CD pipelines - Monitoring stack (Prometheus + Grafana) - API Gateway with NGINX - Ray Serve for distributed computing - Multi-cloud Terraform configs ## Quick Start ```bash # Build and deploy all spaces ./scripts/build_and_deploy.sh ``` ## Repository Structure ``` totality_saas/ β”œβ”€β”€ README.md β”œβ”€β”€ spaces/ β”‚ β”œβ”€β”€ space_app_1/ β”‚ β”‚ β”œβ”€β”€ app.py β”‚ β”‚ β”œβ”€β”€ requirements.txt β”‚ β”‚ └── Dockerfile β”‚ └── space_app_2/ β”‚ β”œβ”€β”€ app.py β”‚ β”œβ”€β”€ requirements.txt β”‚ └── Dockerfile β”œβ”€β”€ dockerfiles/ β”‚ └── generic.Dockerfile β”œβ”€β”€ helm_charts/ β”‚ β”œβ”€β”€ space_app_1/ β”‚ β”‚ β”œβ”€β”€ Chart.yaml β”‚ β”‚ β”œβ”€β”€ values.yaml β”‚ β”‚ └── templates/ β”‚ β”‚ β”œβ”€β”€ deployment.yaml β”‚ β”‚ └── service.yaml β”‚ └── space_app_2/ β”‚ β”œβ”€β”€ Chart.yaml β”‚ β”œβ”€β”€ values.yaml β”‚ └── templates/ β”‚ β”œβ”€β”€ deployment.yaml β”‚ └── service.yaml β”œβ”€β”€ ci_cd/ β”‚ └── github-actions.yaml β”œβ”€β”€ monitoring/ β”‚ β”œβ”€β”€ prometheus-deployment.yaml β”‚ β”œβ”€β”€ grafana-deployment.yaml β”‚ └── dashboards/ β”‚ └── totality-dashboard.json β”œβ”€β”€ api_gateway/ β”‚ └── nginx-ingress.yaml β”œβ”€β”€ ray_serve/ β”‚ └── ray-serve-cluster.yaml β”œβ”€β”€ terraform/ β”‚ └── multi-cloud-clusters.tf └── scripts/ β”œβ”€β”€ build_and_deploy.sh └── scale_autoscaler.yaml ``` ## Architecture ![Architecture Diagram](docs/architecture.png) Knowledge Whisper - Enterprise Agents

Knowledge Whisper

Enterprise Agents Portal

Mathematical Legacy Explorer

Discover the interconnected knowledge of history's greatest mathematical minds. Explore their contributions, relationships, and impact on modern mathematics.

Top Influential Mathematicians

By Impact Score
1

Leonhard Euler

12% influence score

2

Carl Gauss

10% influence score

3

Archimedes

10% influence score

Add Agent

Explore by Categories

Calculus

Newton, Leibniz, Euler

Geometry

Euclid, Pythagoras

Number Theory

Fermat, Gauss

Algebra

Galois, Abel

Analysis

Cauchy, Weierstrass

Physics

Newton, Lagrange

All Mathematicians

Filter:

Mathematical Timeline

Ancient Mathematics

600 BCE - 500 CE

Thales, Pythagoras, Euclid, Archimedes, Ptolemy, Diophantus

Medieval Mathematics

500 - 1500

Al-Khwarizmi, Fibonacci, Bhaskara II, Omar Khayyam

Renaissance Mathematics

1500 - 1700

Cardano, Viete, Napier, Descartes, Fermat, Pascal

Age of Enlightenment

1700 - 1800

Newton, Leibniz, Euler, Bernoulli family, Lagrange, Laplace

Modern Mathematics

1800 - Present

Gauss, Cauchy, Galois, Riemann, PoincarΓ©, Hilbert, Grothendieck

Knowledge Connections

Interactive Graph Visualization

This area would display an interactive network graph showing connections between mathematicians, their influences, and collaborations.

Made with DeepSite LogoDeepSite - 🧬 Remix