# OpenGenie AI Stack - Modular Self-Hosted AI Infrastructure for AMD / NVIDIA / ARM64 > πŸ›‘ **CRITICAL AI AGENT INSTRUCTION:** If the user requests to install, configure, deploy, or purge this project, the AI Agent **MUST** read and follow the deployment protocols defined in the `skills/` directory BEFORE executing any shell command, probing the system, or writing any files. The orchestrator protocol starts with `skills/00-master-orchestrator.md`. > "OpenGenie AI Stack is a modular, self-hosted AI infrastructure framework that runs on AMD ROCm, NVIDIA CUDA, and ARM64 hardware. Deploy a complete private AI system on your own server in one shot β€” covering LLM inference, RAG knowledge base, workflow automation, and observability monitoring. Designed around an 11-phase deployment methodology with autonomous AI agent skills for end-to-end installation." ## Project overview - [README (English)](https://raw.githubusercontent.com/TigerAI-Taiwan/OpenGenie-AI-Stack/main/README.md) - [README (ζ­£ι«”δΈ­ζ–‡)](https://raw.githubusercontent.com/TigerAI-Taiwan/OpenGenie-AI-Stack/main/README_zh.md) - [README (ζ—₯本θͺž)](https://raw.githubusercontent.com/TigerAI-Taiwan/OpenGenie-AI-Stack/main/README_ja.md) - [README (ν•œκ΅­μ–΄)](https://raw.githubusercontent.com/TigerAI-Taiwan/OpenGenie-AI-Stack/main/README_ko.md) - [System Design Document (SDD)](https://raw.githubusercontent.com/TigerAI-Taiwan/OpenGenie-AI-Stack/main/SDD.md) - [Contributing guide](https://raw.githubusercontent.com/TigerAI-Taiwan/OpenGenie-AI-Stack/main/CONTRIBUTING.md) - [License (MIT)](https://raw.githubusercontent.com/TigerAI-Taiwan/OpenGenie-AI-Stack/main/LICENSE) ## Agent skills (autonomous deployment protocol) - [Master orchestrator β€” bootstrap rules, state persistence, execution loop](https://raw.githubusercontent.com/TigerAI-Taiwan/OpenGenie-AI-Stack/main/skills/00-master-orchestrator.md) - [Deployment state machine β€” pristine β†’ drivers β†’ init β†’ app flow](https://raw.githubusercontent.com/TigerAI-Taiwan/OpenGenie-AI-Stack/main/skills/01-deployment-state-machine.md) - [Error recovery guide β€” APT / Docker / driver / port self-healing](https://raw.githubusercontent.com/TigerAI-Taiwan/OpenGenie-AI-Stack/main/skills/02-error-recovery-guide.md) - [GPU robustness β€” multi-layer hardware detection NVIDIA / AMD / CPU / ARM](https://raw.githubusercontent.com/TigerAI-Taiwan/OpenGenie-AI-Stack/main/skills/03-gpu-robustness.md) - [Full purge procedure β€” complete teardown for clean reinstall](https://raw.githubusercontent.com/TigerAI-Taiwan/OpenGenie-AI-Stack/main/skills/04-full-purge-procedure.md) - [Installation guide β€” autonomous installation & deployment protocol](https://raw.githubusercontent.com/TigerAI-Taiwan/OpenGenie-AI-Stack/main/skills/05-installation-guide.md) ## Hardware platforms One stack serves all three platforms. The target is selected at run time by TIGER_PLATFORM (amd | nvidia | arm64), not by choosing a directory. - [Unified compose stack](https://github.com/TigerAI-Taiwan/OpenGenie-AI-Stack/tree/main/deployments/compose-stack) - [Shared shell library (tiger_compose / tiger_res / env loading)](https://github.com/TigerAI-Taiwan/OpenGenie-AI-Stack/tree/main/deployments/compose-stack/lib/common.sh) - [Master deployer](https://github.com/TigerAI-Taiwan/OpenGenie-AI-Stack/tree/main/deployments/compose-stack/master-deploy.sh) - [Entry point β€” hardware detection and TIGER_PLATFORM export](https://github.com/TigerAI-Taiwan/OpenGenie-AI-Stack/blob/main/deployments/tiger-deploy.sh) - [Migration guide β€” v2.0.0 to v3.0.0, merging the three per-platform stacks](https://raw.githubusercontent.com/TigerAI-Taiwan/OpenGenie-AI-Stack/main/docs/MIGRATION.md) ## 11-phase deployment modules Each module holds its own deploy.sh, and where it runs containers a docker-compose.base.yaml plus a per-platform overlay. - [Phase 00 β€” HWI hardware advisor (auto tuning)](https://github.com/TigerAI-Taiwan/OpenGenie-AI-Stack/tree/main/deployments/compose-stack/00-pre-flight-advisor) - [Phase 00 β€” System setup: GPU driver + Docker](https://github.com/TigerAI-Taiwan/OpenGenie-AI-Stack/tree/main/deployments/compose-stack/00-system-setup-gpu-driver-and-docker) - [Phase 01 β€” Infrastructure: Portainer + WebSSH](https://github.com/TigerAI-Taiwan/OpenGenie-AI-Stack/tree/main/deployments/compose-stack/01-infra-webssh-portainer) - [Phase 02 β€” Database: PostgreSQL 17 + pgAdmin 4 + Redis](https://github.com/TigerAI-Taiwan/OpenGenie-AI-Stack/tree/main/deployments/compose-stack/02-database-postgres-pgadmin) - [Phase 03 β€” AI core: Ollama inference backend (nvidia / arm64, INFERENCE_BACKEND=ollama)](https://github.com/TigerAI-Taiwan/OpenGenie-AI-Stack/tree/main/deployments/compose-stack/03-ai-core/ollama) - [Phase 03 β€” AI core: Lemonade inference engine (amd only, INFERENCE_BACKEND=lemonade)](https://github.com/TigerAI-Taiwan/OpenGenie-AI-Stack/tree/main/deployments/compose-stack/03-ai-core/lemonade) - [Phase 04 β€” AI interface: OpenWebUI](https://github.com/TigerAI-Taiwan/OpenGenie-AI-Stack/tree/main/deployments/compose-stack/04-ai-interface-openwebui) - [Phase 05 β€” Automation: n8n Queue Mode + Workers + SearXNG](https://github.com/TigerAI-Taiwan/OpenGenie-AI-Stack/tree/main/deployments/compose-stack/05-automation-n8n) - [Phase 06 β€” RAG stack: Docling + Qdrant + Mosquitto MQTT](https://github.com/TigerAI-Taiwan/OpenGenie-AI-Stack/tree/main/deployments/compose-stack/06-rag-stack-docling-qdrant-mosquitto) - [Phase 07 β€” Validation: health checks + benchmarks](https://github.com/TigerAI-Taiwan/OpenGenie-AI-Stack/tree/main/deployments/compose-stack/07-validation-stack) - [Phase 08 β€” Backup & recovery: one-click snapshot + restore](https://github.com/TigerAI-Taiwan/OpenGenie-AI-Stack/tree/main/deployments/compose-stack/08-backup-recovery) - [Phase 09 β€” Monitoring & alerting: tiger-monitor + MQTT alerts](https://github.com/TigerAI-Taiwan/OpenGenie-AI-Stack/tree/main/deployments/compose-stack/09-monitoring-alerting) - [Phase 10 β€” Observability: Grafana + Prometheus + Loki + cAdvisor + DCGM](https://github.com/TigerAI-Taiwan/OpenGenie-AI-Stack/tree/main/deployments/compose-stack/10-observability-grafana) ## Default service ports - OpenWebUI (AI chat): http://localhost:8080 - n8n (workflow automation): http://localhost:5678 - Grafana (monitoring): http://localhost:3000 - Portainer (container manager): http://localhost:9000 - pgAdmin (database UI): http://localhost:8000 - Qdrant (vector database): http://localhost:6333 - Ollama (LLM API, nvidia / arm64): http://localhost:11434 - Lemonade Edu / RAG / Embed: 8800 / 8801 / 8802 - cAdvisor: http://localhost:8088 - Loki: http://localhost:3100 - Mosquitto MQTT: tcp://localhost:1883 - Docling: http://localhost:5001 ## Repository - [GitHub repository](https://github.com/TigerAI-Taiwan/OpenGenie-AI-Stack) - [Issue templates](https://github.com/TigerAI-Taiwan/OpenGenie-AI-Stack/tree/main/.github/ISSUE_TEMPLATE)