From c2d54dd915663bc92fad888d29012626de090bdf Mon Sep 17 00:00:00 2001 From: Adolfo Delorenzo Date: Tue, 10 Mar 2026 14:30:02 -0300 Subject: [PATCH] feat: add 18 AI/ML Portainer templates with gap analysis --- ai-templates/README.md | 143 +++++ ai-templates/docs/AI_GAP_ANALYSIS.md | 70 +++ ai-templates/portainer-ai-templates.json | 581 ++++++++++++++++++ .../stacks/chromadb/docker-compose.yml | 20 + .../stacks/comfyui/docker-compose.yml | 31 + .../stacks/flowise/docker-compose.yml | 19 + .../stacks/jupyter-gpu/docker-compose.yml | 26 + .../stacks/label-studio/docker-compose.yml | 19 + .../stacks/langflow/docker-compose.yml | 18 + .../stacks/litellm/docker-compose.yml | 33 + .../stacks/localai/docker-compose.yml | 25 + ai-templates/stacks/mlflow/docker-compose.yml | 20 + ai-templates/stacks/n8n-ai/docker-compose.yml | 20 + ai-templates/stacks/ollama/docker-compose.yml | 25 + .../stacks/open-webui/docker-compose.yml | 39 ++ ai-templates/stacks/qdrant/docker-compose.yml | 19 + .../stable-diffusion-webui/docker-compose.yml | 25 + .../text-generation-webui/docker-compose.yml | 35 ++ ai-templates/stacks/vllm/docker-compose.yml | 29 + .../stacks/weaviate/docker-compose.yml | 22 + .../stacks/whisper/docker-compose.yml | 19 + 21 files changed, 1238 insertions(+) create mode 100644 ai-templates/README.md create mode 100644 ai-templates/docs/AI_GAP_ANALYSIS.md create mode 100644 ai-templates/portainer-ai-templates.json create mode 100644 ai-templates/stacks/chromadb/docker-compose.yml create mode 100644 ai-templates/stacks/comfyui/docker-compose.yml create mode 100644 ai-templates/stacks/flowise/docker-compose.yml create mode 100644 ai-templates/stacks/jupyter-gpu/docker-compose.yml create mode 100644 ai-templates/stacks/label-studio/docker-compose.yml create mode 100644 ai-templates/stacks/langflow/docker-compose.yml create mode 100644 ai-templates/stacks/litellm/docker-compose.yml create mode 100644 ai-templates/stacks/localai/docker-compose.yml create mode 100644 ai-templates/stacks/mlflow/docker-compose.yml create mode 100644 ai-templates/stacks/n8n-ai/docker-compose.yml create mode 100644 ai-templates/stacks/ollama/docker-compose.yml create mode 100644 ai-templates/stacks/open-webui/docker-compose.yml create mode 100644 ai-templates/stacks/qdrant/docker-compose.yml create mode 100644 ai-templates/stacks/stable-diffusion-webui/docker-compose.yml create mode 100644 ai-templates/stacks/text-generation-webui/docker-compose.yml create mode 100644 ai-templates/stacks/vllm/docker-compose.yml create mode 100644 ai-templates/stacks/weaviate/docker-compose.yml create mode 100644 ai-templates/stacks/whisper/docker-compose.yml diff --git a/ai-templates/README.md b/ai-templates/README.md new file mode 100644 index 0000000..7d165f5 --- /dev/null +++ b/ai-templates/README.md @@ -0,0 +1,143 @@ +# Portainer AI Templates + +> **18 production-ready AI/ML Docker Compose stacks for Portainer** — filling the AI gap in the official v3 template library. + +## Background + +The official [Portainer v3 templates](https://raw.githubusercontent.com/portainer/templates/v3/templates.json) contain **71 templates** with **zero pure AI/ML deployments**. This repository provides a curated, Portainer-compatible template set covering the entire AI infrastructure stack. + +See [docs/AI_GAP_ANALYSIS.md](docs/AI_GAP_ANALYSIS.md) for the full gap analysis. + +## Quick Start + +### Option A: Use as Custom Template URL in Portainer + +1. In Portainer, go to **Settings → App Templates** +2. Set the URL to: + ``` + https://git.oe74.net/adelorenzo/portainer_scripts/raw/branch/master/ai-templates/portainer-ai-templates.json + ``` +3. Click **Save** — AI templates now appear in your App Templates list + +### Option B: Deploy Individual Stacks + +Each stack has its own `docker-compose.yml` in `stacks//`: + +```bash +cd stacks/ollama +docker compose up -d +``` + +## Template Catalog + +### LLM Inference & Model Serving + +| Template | Port | GPU | Description | +|---|---|---|---| +| **Ollama** | 11434 | Yes | Local LLM engine — Llama, Mistral, Qwen, Gemma, Phi | +| **Open WebUI + Ollama** | 3000 | Yes | ChatGPT-like UI bundled with Ollama backend | +| **LocalAI** | 8080 | Yes | Drop-in OpenAI API replacement | +| **vLLM** | 8000 | Yes | High-throughput serving with PagedAttention | +| **Text Gen WebUI** | 7860 | Yes | Comprehensive LLM interface (oobabooga) | +| **LiteLLM Proxy** | 4000 | No | Unified API gateway for 100+ LLM providers | + +### Image & Video Generation + +| Template | Port | GPU | Description | +|---|---|---|---| +| **ComfyUI** | 8188 | Yes | Node-based Stable Diffusion workflow engine | +| **Stable Diffusion WebUI** | 7860 | Yes | AUTOMATIC1111 interface for image generation | + +### AI Agents & Workflows + +| Template | Port | GPU | Description | +|---|---|---|---| +| **Langflow** | 7860 | No | Visual multi-agent and RAG pipeline builder | +| **Flowise** | 3000 | No | Drag-and-drop LLM chatflow builder | +| **n8n (AI-Enabled)** | 5678 | No | Workflow automation with AI agent nodes | + +### Vector Databases + +| Template | Port | GPU | Description | +|---|---|---|---| +| **Qdrant** | 6333 | No | High-performance vector similarity search | +| **ChromaDB** | 8000 | No | AI-native embedding database | +| **Weaviate** | 8080 | No | Vector DB with built-in vectorization modules | + +### ML Operations + +| Template | Port | GPU | Description | +|---|---|---|---| +| **MLflow** | 5000 | No | Experiment tracking and model registry | +| **Label Studio** | 8080 | No | Multi-type data labeling platform | +| **Jupyter (GPU/PyTorch)** | 8888 | Yes | GPU-accelerated notebooks | + +### Speech & Audio + +| Template | Port | GPU | Description | +|---|---|---|---| +| **Whisper ASR** | 9000 | Yes | Speech-to-text API server | + +## GPU Requirements + +Templates marked **GPU: Yes** require: +- NVIDIA GPU with CUDA support +- [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html) installed +- Docker configured with `nvidia` runtime + +For AMD GPUs (ROCm), modify the `deploy.resources` section to use ROCm-compatible images and remove the NVIDIA device reservation. + +## File Structure + +``` +ai-templates/ +├── portainer-ai-templates.json # Portainer v3 compatible template definition +├── README.md # This file +├── docs/ +│ └── AI_GAP_ANALYSIS.md # Analysis of official templates gap +└── stacks/ + ├── ollama/ + │ └── docker-compose.yml + ├── open-webui/ + │ └── docker-compose.yml + ├── localai/ + │ └── docker-compose.yml + ├── vllm/ + │ └── docker-compose.yml + ├── text-generation-webui/ + │ └── docker-compose.yml + ├── litellm/ + │ └── docker-compose.yml + ├── comfyui/ + │ └── docker-compose.yml + ├── stable-diffusion-webui/ + │ └── docker-compose.yml + ├── langflow/ + │ └── docker-compose.yml + ├── flowise/ + │ └── docker-compose.yml + ├── n8n-ai/ + │ └── docker-compose.yml + ├── qdrant/ + │ └── docker-compose.yml + ├── chromadb/ + │ └── docker-compose.yml + ├── weaviate/ + │ └── docker-compose.yml + ├── mlflow/ + │ └── docker-compose.yml + ├── label-studio/ + │ └── docker-compose.yml + ├── jupyter-gpu/ + │ └── docker-compose.yml + └── whisper/ + └── docker-compose.yml +``` + +## License + +These templates reference publicly available Docker images from their respective maintainers. Each tool has its own license — refer to the individual project documentation. + +--- + +*Generated March 2026 — Portainer AI Templates by Adolfo De Lorenzo* diff --git a/ai-templates/docs/AI_GAP_ANALYSIS.md b/ai-templates/docs/AI_GAP_ANALYSIS.md new file mode 100644 index 0000000..1a73994 --- /dev/null +++ b/ai-templates/docs/AI_GAP_ANALYSIS.md @@ -0,0 +1,70 @@ +# Portainer v3 Templates — AI Gap Analysis + +## Overview + +The official Portainer v3 templates (`templates.json`) contain **71 templates** across the following categories: + +| Category | Count | Examples | +|---|---|---| +| Database | 10 | MySQL, PostgreSQL, Mongo, Redis, CrateDB, Elasticsearch, CockroachDB, TimescaleDB | +| Edge/IIoT | 14 | Softing EdgeConnectors, OPC Router, TOSIBOX, EMQX MQTT, Mosquitto, Node-RED, Litmus Edge | +| Web/CMS | 8 | Nginx, Caddy, WordPress, Drupal, Joomla, Ghost, Plone | +| DevOps/CI | 5 | Jenkins, GitLab CE, Dokku, Registry | +| Monitoring | 4 | Grafana, Datadog, Sematext, Swarm Monitoring | +| Messaging | 1 | RabbitMQ | +| Storage | 3 | Minio, Scality S3, File Browser | +| Serverless | 2 | OpenFaaS, IronFunctions | +| Other | 6 | Ubuntu, NodeJS, Portainer Agent, OpenAMT, FDO, LiveSwitch | + +## AI Template Count: **0** + +There are **zero purely AI/ML-focused templates** in the current v3 template list. + +### Closest to AI + +- **Litmus Edge** (#70, #71) — Described as "enables industrial AI at scale" but is fundamentally an OT data platform / edge data collector, not an AI deployment. +- **Elasticsearch** (#13) — Used in vector search / RAG pipelines but is a general-purpose search engine. + +### Gap + +The templates completely miss the fastest-growing Docker deployment category: AI inference, model serving, LLM tooling, vector databases, ML pipelines, AI-powered agents, and GPU-accelerated workloads. + +--- + +## Recommended AI Template Additions + +This repository provides **18 production-ready AI Docker Compose stacks** for Portainer, organized into the following sub-categories: + +### LLM Inference & Model Serving +1. **Ollama** — Local LLM inference engine (Llama, Mistral, Qwen, Gemma, etc.) +2. **Open WebUI** — ChatGPT-like web interface for Ollama/OpenAI-compatible backends +3. **LocalAI** — Drop-in OpenAI API replacement, runs models locally +4. **vLLM** — High-throughput LLM serving with PagedAttention +5. **Text Generation WebUI** — Comprehensive LLM interface (oobabooga) +6. **LiteLLM** — Unified LLM API gateway / proxy + +### Image & Video Generation +7. **ComfyUI** — Node-based Stable Diffusion workflow engine +8. **Stable Diffusion WebUI** — AUTOMATIC1111 web interface for image generation + +### AI Agents & Workflows +9. **Langflow** — Visual framework for building LLM-powered agents +10. **Flowise** — Drag-and-drop LLM orchestration / chatflow builder +11. **n8n AI** — Workflow automation with AI agent nodes + +### Vector Databases +12. **Qdrant** — High-performance vector similarity search engine +13. **ChromaDB** — AI-native open-source embedding database +14. **Weaviate** — Vector database with built-in vectorization modules + +### ML Operations +15. **MLflow** — ML experiment tracking, model registry, and serving +16. **Label Studio** — Multi-type data labeling and annotation platform +17. **Jupyter GPU** — GPU-accelerated Jupyter notebooks for ML development + +### Speech & Audio +18. **Whisper** — OpenAI Whisper speech-to-text API server + +--- + +*Generated: March 2026 — For use with Portainer Business Edition and Community Edition* diff --git a/ai-templates/portainer-ai-templates.json b/ai-templates/portainer-ai-templates.json new file mode 100644 index 0000000..378fd4b --- /dev/null +++ b/ai-templates/portainer-ai-templates.json @@ -0,0 +1,581 @@ +{ + "version": "3", + "templates": [ + { + "id": 1, + "type": 3, + "title": "Ollama", + "description": "Local LLM inference engine supporting Llama, Mistral, Qwen, Gemma, Phi and 100+ models with GPU acceleration", + "note": "Requires NVIDIA GPU with Docker GPU runtime configured. Pull models after deployment with: docker exec ollama ollama pull llama3.1", + "categories": ["ai", "llm", "inference"], + "platform": "linux", + "logo": "https://ollama.com/public/ollama.png", + "repository": { + "url": "https://git.oe74.net/adelorenzo/portainer_scripts", + "stackfile": "ai-templates/stacks/ollama/docker-compose.yml" + }, + "env": [ + { + "name": "OLLAMA_PORT", + "label": "Ollama API port", + "default": "11434" + }, + { + "name": "OLLAMA_NUM_PARALLEL", + "label": "Max parallel requests", + "default": "4" + }, + { + "name": "OLLAMA_MAX_LOADED_MODELS", + "label": "Max models loaded in VRAM", + "default": "2" + } + ] + }, + { + "id": 2, + "type": 3, + "title": "Open WebUI + Ollama", + "description": "Full-featured ChatGPT-like web interface bundled with Ollama backend for local LLM inference", + "note": "Access the web UI at the configured port. First user to register becomes admin. Requires NVIDIA GPU.", + "categories": ["ai", "llm", "chat-ui"], + "platform": "linux", + "logo": "https://docs.openwebui.com/img/logo.png", + "repository": { + "url": "https://git.oe74.net/adelorenzo/portainer_scripts", + "stackfile": "ai-templates/stacks/open-webui/docker-compose.yml" + }, + "env": [ + { + "name": "OPEN_WEBUI_PORT", + "label": "Web UI port", + "default": "3000" + }, + { + "name": "OLLAMA_PORT", + "label": "Ollama API port", + "default": "11434" + }, + { + "name": "WEBUI_SECRET_KEY", + "label": "Secret key for sessions", + "default": "changeme" + }, + { + "name": "ENABLE_SIGNUP", + "label": "Allow user registration", + "default": "true" + } + ] + }, + { + "id": 3, + "type": 3, + "title": "LocalAI", + "description": "Drop-in OpenAI API compatible replacement. Run LLMs, generate images, audio locally with GPU acceleration", + "note": "Exposes an OpenAI-compatible API at /v1/. Models can be loaded via the API or placed in the models volume.", + "categories": ["ai", "llm", "openai-api"], + "platform": "linux", + "logo": "https://localai.io/logo.png", + "repository": { + "url": "https://git.oe74.net/adelorenzo/portainer_scripts", + "stackfile": "ai-templates/stacks/localai/docker-compose.yml" + }, + "env": [ + { + "name": "LOCALAI_PORT", + "label": "API port", + "default": "8080" + }, + { + "name": "THREADS", + "label": "CPU threads for inference", + "default": "4" + }, + { + "name": "CONTEXT_SIZE", + "label": "Default context window size", + "default": "4096" + } + ] + }, + { + "id": 4, + "type": 3, + "title": "vLLM", + "description": "High-throughput LLM serving engine with PagedAttention, continuous batching, and OpenAI-compatible API", + "note": "Requires NVIDIA GPU with sufficient VRAM for the chosen model. HuggingFace token needed for gated models.", + "categories": ["ai", "llm", "inference", "high-performance"], + "platform": "linux", + "logo": "https://docs.vllm.ai/en/latest/_static/vllm-logo-text-light.png", + "repository": { + "url": "https://git.oe74.net/adelorenzo/portainer_scripts", + "stackfile": "ai-templates/stacks/vllm/docker-compose.yml" + }, + "env": [ + { + "name": "VLLM_PORT", + "label": "API port", + "default": "8000" + }, + { + "name": "MODEL_NAME", + "label": "HuggingFace model ID", + "default": "meta-llama/Llama-3.1-8B-Instruct" + }, + { + "name": "HF_TOKEN", + "label": "HuggingFace access token" + }, + { + "name": "MAX_MODEL_LEN", + "label": "Max sequence length", + "default": "4096" + }, + { + "name": "GPU_MEM_UTIL", + "label": "GPU memory utilization (0-1)", + "default": "0.90" + }, + { + "name": "TENSOR_PARALLEL", + "label": "Tensor parallel GPU count", + "default": "1" + } + ] + }, + { + "id": 5, + "type": 3, + "title": "Text Generation WebUI", + "description": "Comprehensive web UI for running LLMs locally (oobabooga). Supports GGUF, GPTQ, AWQ, EXL2, and HF formats", + "note": "Requires NVIDIA GPU. Models should be placed in the models volume. Supports extensions for RAG, TTS, and more.", + "categories": ["ai", "llm", "chat-ui"], + "platform": "linux", + "logo": "https://raw.githubusercontent.com/oobabooga/text-generation-webui/main/docs/logo.png", + "repository": { + "url": "https://git.oe74.net/adelorenzo/portainer_scripts", + "stackfile": "ai-templates/stacks/text-generation-webui/docker-compose.yml" + }, + "env": [ + { + "name": "WEBUI_PORT", + "label": "Web UI port", + "default": "7860" + }, + { + "name": "API_PORT", + "label": "API port", + "default": "5000" + }, + { + "name": "STREAM_PORT", + "label": "Streaming API port", + "default": "5005" + }, + { + "name": "EXTRA_LAUNCH_ARGS", + "label": "Extra launch arguments", + "default": "--listen --api" + } + ] + }, + { + "id": 6, + "type": 3, + "title": "LiteLLM Proxy", + "description": "Unified LLM API gateway supporting 100+ providers (OpenAI, Anthropic, Ollama, vLLM, etc.) with spend tracking and load balancing", + "note": "Configure models in /app/config/litellm_config.yaml after deployment. Includes PostgreSQL for usage tracking.", + "categories": ["ai", "llm", "api-gateway", "proxy"], + "platform": "linux", + "logo": "https://litellm.ai/favicon.ico", + "repository": { + "url": "https://git.oe74.net/adelorenzo/portainer_scripts", + "stackfile": "ai-templates/stacks/litellm/docker-compose.yml" + }, + "env": [ + { + "name": "LITELLM_PORT", + "label": "Proxy API port", + "default": "4000" + }, + { + "name": "LITELLM_MASTER_KEY", + "label": "Master API key", + "default": "sk-master-key" + }, + { + "name": "PG_USER", + "label": "PostgreSQL user", + "default": "litellm" + }, + { + "name": "PG_PASSWORD", + "label": "PostgreSQL password", + "default": "litellm" + } + ] + }, + { + "id": 7, + "type": 3, + "title": "ComfyUI", + "description": "Node-based Stable Diffusion workflow engine for image and video generation with GPU acceleration", + "note": "Requires NVIDIA GPU. Access the node editor at the configured port. Models go in the models volume.", + "categories": ["ai", "image-generation", "stable-diffusion"], + "platform": "linux", + "logo": "https://raw.githubusercontent.com/comfyanonymous/ComfyUI/master/web/assets/comfyui-logo.png", + "repository": { + "url": "https://git.oe74.net/adelorenzo/portainer_scripts", + "stackfile": "ai-templates/stacks/comfyui/docker-compose.yml" + }, + "env": [ + { + "name": "COMFYUI_PORT", + "label": "Web UI port", + "default": "8188" + }, + { + "name": "CLI_ARGS", + "label": "Launch arguments", + "default": "--listen 0.0.0.0 --port 8188" + } + ] + }, + { + "id": 8, + "type": 3, + "title": "Stable Diffusion WebUI", + "description": "AUTOMATIC1111 web interface for Stable Diffusion image generation with extensive extension ecosystem", + "note": "Requires NVIDIA GPU with 8GB+ VRAM. First startup downloads the base model and may take several minutes.", + "categories": ["ai", "image-generation", "stable-diffusion"], + "platform": "linux", + "logo": "https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/html/logo.png", + "repository": { + "url": "https://git.oe74.net/adelorenzo/portainer_scripts", + "stackfile": "ai-templates/stacks/stable-diffusion-webui/docker-compose.yml" + }, + "env": [ + { + "name": "SD_PORT", + "label": "Web UI port", + "default": "7860" + }, + { + "name": "CLI_ARGS", + "label": "Launch arguments", + "default": "--listen --api --xformers" + } + ] + }, + { + "id": 9, + "type": 3, + "title": "Langflow", + "description": "Visual framework for building multi-agent and RAG applications. Drag-and-drop LLM pipeline builder", + "note": "Access the visual editor at the configured port. Connect to Ollama, OpenAI, or any LLM backend.", + "categories": ["ai", "agents", "rag", "workflows"], + "platform": "linux", + "logo": "https://avatars.githubusercontent.com/u/128686189", + "repository": { + "url": "https://git.oe74.net/adelorenzo/portainer_scripts", + "stackfile": "ai-templates/stacks/langflow/docker-compose.yml" + }, + "env": [ + { + "name": "LANGFLOW_PORT", + "label": "Web UI port", + "default": "7860" + }, + { + "name": "AUTO_LOGIN", + "label": "Skip login screen", + "default": "true" + } + ] + }, + { + "id": 10, + "type": 3, + "title": "Flowise", + "description": "Drag-and-drop LLM orchestration tool. Build chatbots, agents, and RAG pipelines without coding", + "note": "Default credentials are admin/changeme. Connect to any OpenAI-compatible API backend.", + "categories": ["ai", "agents", "rag", "chatbots"], + "platform": "linux", + "logo": "https://flowiseai.com/favicon.ico", + "repository": { + "url": "https://git.oe74.net/adelorenzo/portainer_scripts", + "stackfile": "ai-templates/stacks/flowise/docker-compose.yml" + }, + "env": [ + { + "name": "FLOWISE_PORT", + "label": "Web UI port", + "default": "3000" + }, + { + "name": "FLOWISE_USERNAME", + "label": "Admin username", + "default": "admin" + }, + { + "name": "FLOWISE_PASSWORD", + "label": "Admin password", + "default": "changeme" + } + ] + }, + { + "id": 11, + "type": 3, + "title": "n8n (AI-Enabled)", + "description": "Workflow automation platform with built-in AI agent nodes, LLM chains, and vector store integrations", + "note": "AI features include: AI Agent nodes, LLM Chain, Document Loaders, Vector Stores, Text Splitters, and Memory nodes.", + "categories": ["ai", "automation", "workflows", "agents"], + "platform": "linux", + "logo": "https://n8n.io/favicon.ico", + "repository": { + "url": "https://git.oe74.net/adelorenzo/portainer_scripts", + "stackfile": "ai-templates/stacks/n8n-ai/docker-compose.yml" + }, + "env": [ + { + "name": "N8N_PORT", + "label": "Web UI port", + "default": "5678" + }, + { + "name": "N8N_USER", + "label": "Admin username", + "default": "admin" + }, + { + "name": "N8N_PASSWORD", + "label": "Admin password", + "default": "changeme" + }, + { + "name": "WEBHOOK_URL", + "label": "External webhook URL", + "default": "http://localhost:5678/" + } + ] + }, + { + "id": 12, + "type": 3, + "title": "Qdrant", + "description": "High-performance vector similarity search engine for RAG, semantic search, and AI applications", + "note": "REST API on port 6333, gRPC on 6334. Supports filtering, payload indexing, and distributed mode.", + "categories": ["ai", "vector-database", "rag", "embeddings"], + "platform": "linux", + "logo": "https://qdrant.tech/images/logo_with_text.png", + "repository": { + "url": "https://git.oe74.net/adelorenzo/portainer_scripts", + "stackfile": "ai-templates/stacks/qdrant/docker-compose.yml" + }, + "env": [ + { + "name": "QDRANT_HTTP_PORT", + "label": "REST API port", + "default": "6333" + }, + { + "name": "QDRANT_GRPC_PORT", + "label": "gRPC port", + "default": "6334" + }, + { + "name": "QDRANT_API_KEY", + "label": "API key (optional)" + } + ] + }, + { + "id": 13, + "type": 3, + "title": "ChromaDB", + "description": "AI-native open-source embedding database. The easiest vector store to get started with for RAG applications", + "note": "Persistent storage enabled by default. Compatible with LangChain, LlamaIndex, and all major AI frameworks.", + "categories": ["ai", "vector-database", "rag", "embeddings"], + "platform": "linux", + "logo": "https://www.trychroma.com/chroma-logo.png", + "repository": { + "url": "https://git.oe74.net/adelorenzo/portainer_scripts", + "stackfile": "ai-templates/stacks/chromadb/docker-compose.yml" + }, + "env": [ + { + "name": "CHROMA_PORT", + "label": "API port", + "default": "8000" + }, + { + "name": "CHROMA_TOKEN", + "label": "Auth token (optional)" + }, + { + "name": "TELEMETRY", + "label": "Anonymous telemetry", + "default": "FALSE" + } + ] + }, + { + "id": 14, + "type": 3, + "title": "Weaviate", + "description": "AI-native vector database with built-in vectorization modules and hybrid search capabilities", + "note": "Supports text2vec-transformers, generative-openai, and many other modules. Configure modules via environment variables.", + "categories": ["ai", "vector-database", "rag", "search"], + "platform": "linux", + "logo": "https://weaviate.io/img/site/weaviate-logo-light.png", + "repository": { + "url": "https://git.oe74.net/adelorenzo/portainer_scripts", + "stackfile": "ai-templates/stacks/weaviate/docker-compose.yml" + }, + "env": [ + { + "name": "WEAVIATE_HTTP_PORT", + "label": "HTTP API port", + "default": "8080" + }, + { + "name": "WEAVIATE_GRPC_PORT", + "label": "gRPC port", + "default": "50051" + }, + { + "name": "VECTORIZER", + "label": "Default vectorizer module", + "default": "none" + }, + { + "name": "MODULES", + "label": "Enabled modules", + "default": "text2vec-transformers,generative-openai" + }, + { + "name": "ANON_ACCESS", + "label": "Anonymous access enabled", + "default": "true" + } + ] + }, + { + "id": 15, + "type": 3, + "title": "MLflow", + "description": "Open-source ML lifecycle platform — experiment tracking, model registry, and model serving", + "note": "Access the tracking UI at the configured port. Uses SQLite backend by default — switch to PostgreSQL for production.", + "categories": ["ai", "mlops", "experiment-tracking", "model-registry"], + "platform": "linux", + "logo": "https://mlflow.org/img/mlflow-black.svg", + "repository": { + "url": "https://git.oe74.net/adelorenzo/portainer_scripts", + "stackfile": "ai-templates/stacks/mlflow/docker-compose.yml" + }, + "env": [ + { + "name": "MLFLOW_PORT", + "label": "Tracking UI port", + "default": "5000" + } + ] + }, + { + "id": 16, + "type": 3, + "title": "Label Studio", + "description": "Multi-type data labeling and annotation platform for training ML and AI models", + "note": "Supports image, text, audio, video, and time-series annotation. Export to all major ML formats.", + "categories": ["ai", "mlops", "data-labeling", "annotation"], + "platform": "linux", + "logo": "https://labelstud.io/images/ls-logo.png", + "repository": { + "url": "https://git.oe74.net/adelorenzo/portainer_scripts", + "stackfile": "ai-templates/stacks/label-studio/docker-compose.yml" + }, + "env": [ + { + "name": "LS_PORT", + "label": "Web UI port", + "default": "8080" + }, + { + "name": "LS_USER", + "label": "Admin email", + "default": "admin@example.com" + }, + { + "name": "LS_PASSWORD", + "label": "Admin password", + "default": "changeme" + } + ] + }, + { + "id": 17, + "type": 3, + "title": "Jupyter (GPU / PyTorch)", + "description": "GPU-accelerated Jupyter Lab with PyTorch, CUDA, and data science libraries pre-installed", + "note": "Requires NVIDIA GPU. Access with the configured token. Workspace persists in the work volume.", + "categories": ["ai", "ml-development", "notebooks", "pytorch"], + "platform": "linux", + "logo": "https://jupyter.org/assets/homepage/main-logo.svg", + "repository": { + "url": "https://git.oe74.net/adelorenzo/portainer_scripts", + "stackfile": "ai-templates/stacks/jupyter-gpu/docker-compose.yml" + }, + "env": [ + { + "name": "JUPYTER_PORT", + "label": "Jupyter Lab port", + "default": "8888" + }, + { + "name": "JUPYTER_TOKEN", + "label": "Access token", + "default": "changeme" + }, + { + "name": "GRANT_SUDO", + "label": "Allow sudo in notebooks", + "default": "yes" + } + ] + }, + { + "id": 18, + "type": 3, + "title": "Whisper ASR", + "description": "OpenAI Whisper speech-to-text API server with GPU acceleration. Supports transcription and translation", + "note": "Requires NVIDIA GPU. API documentation available at /docs. Supports models: tiny, base, small, medium, large-v3.", + "categories": ["ai", "speech-to-text", "transcription", "audio"], + "platform": "linux", + "logo": "https://upload.wikimedia.org/wikipedia/commons/0/04/ChatGPT_logo.svg", + "repository": { + "url": "https://git.oe74.net/adelorenzo/portainer_scripts", + "stackfile": "ai-templates/stacks/whisper/docker-compose.yml" + }, + "env": [ + { + "name": "WHISPER_PORT", + "label": "API port", + "default": "9000" + }, + { + "name": "ASR_MODEL", + "label": "Whisper model size", + "description": "Options: tiny, base, small, medium, large-v3", + "default": "base" + }, + { + "name": "ASR_ENGINE", + "label": "ASR engine", + "default": "openai_whisper" + } + ] + } + ] +} diff --git a/ai-templates/stacks/chromadb/docker-compose.yml b/ai-templates/stacks/chromadb/docker-compose.yml new file mode 100644 index 0000000..f0a9496 --- /dev/null +++ b/ai-templates/stacks/chromadb/docker-compose.yml @@ -0,0 +1,20 @@ +version: "3.8" + +services: + chromadb: + image: chromadb/chroma:latest + container_name: chromadb + restart: unless-stopped + ports: + - "${CHROMA_PORT:-8000}:8000" + volumes: + - chroma_data:/chroma/chroma + environment: + - IS_PERSISTENT=TRUE + - PERSIST_DIRECTORY=/chroma/chroma + - ANONYMIZED_TELEMETRY=${TELEMETRY:-FALSE} + - CHROMA_SERVER_AUTHN_CREDENTIALS=${CHROMA_TOKEN:-} + - CHROMA_SERVER_AUTHN_PROVIDER=${CHROMA_AUTH_PROVIDER:-} + +volumes: + chroma_data: diff --git a/ai-templates/stacks/comfyui/docker-compose.yml b/ai-templates/stacks/comfyui/docker-compose.yml new file mode 100644 index 0000000..f25f4b1 --- /dev/null +++ b/ai-templates/stacks/comfyui/docker-compose.yml @@ -0,0 +1,31 @@ +version: "3.8" + +services: + comfyui: + image: yanwk/comfyui-boot:latest + container_name: comfyui + restart: unless-stopped + ports: + - "${COMFYUI_PORT:-8188}:8188" + volumes: + - comfyui_data:/root + - comfyui_models:/root/ComfyUI/models + - comfyui_output:/root/ComfyUI/output + - comfyui_input:/root/ComfyUI/input + - comfyui_custom_nodes:/root/ComfyUI/custom_nodes + environment: + - CLI_ARGS=${CLI_ARGS:---listen 0.0.0.0 --port 8188} + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [gpu] + +volumes: + comfyui_data: + comfyui_models: + comfyui_output: + comfyui_input: + comfyui_custom_nodes: diff --git a/ai-templates/stacks/flowise/docker-compose.yml b/ai-templates/stacks/flowise/docker-compose.yml new file mode 100644 index 0000000..d877614 --- /dev/null +++ b/ai-templates/stacks/flowise/docker-compose.yml @@ -0,0 +1,19 @@ +version: "3.8" + +services: + flowise: + image: flowiseai/flowise:latest + container_name: flowise + restart: unless-stopped + ports: + - "${FLOWISE_PORT:-3000}:3000" + volumes: + - flowise_data:/root/.flowise + environment: + - FLOWISE_USERNAME=${FLOWISE_USERNAME:-admin} + - FLOWISE_PASSWORD=${FLOWISE_PASSWORD:-changeme} + - APIKEY_PATH=/root/.flowise + - LOG_PATH=/root/.flowise/logs + +volumes: + flowise_data: diff --git a/ai-templates/stacks/jupyter-gpu/docker-compose.yml b/ai-templates/stacks/jupyter-gpu/docker-compose.yml new file mode 100644 index 0000000..b8554c4 --- /dev/null +++ b/ai-templates/stacks/jupyter-gpu/docker-compose.yml @@ -0,0 +1,26 @@ +version: "3.8" + +services: + jupyter: + image: quay.io/jupyter/pytorch-notebook:latest + container_name: jupyter-gpu + restart: unless-stopped + ports: + - "${JUPYTER_PORT:-8888}:8888" + volumes: + - jupyter_data:/home/jovyan/work + environment: + - JUPYTER_TOKEN=${JUPYTER_TOKEN:-changeme} + - JUPYTER_ENABLE_LAB=yes + - GRANT_SUDO=${GRANT_SUDO:-yes} + user: root + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [gpu] + +volumes: + jupyter_data: diff --git a/ai-templates/stacks/label-studio/docker-compose.yml b/ai-templates/stacks/label-studio/docker-compose.yml new file mode 100644 index 0000000..50558b7 --- /dev/null +++ b/ai-templates/stacks/label-studio/docker-compose.yml @@ -0,0 +1,19 @@ +version: "3.8" + +services: + label-studio: + image: heartexlabs/label-studio:latest + container_name: label-studio + restart: unless-stopped + ports: + - "${LS_PORT:-8080}:8080" + volumes: + - label_studio_data:/label-studio/data + environment: + - LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true + - LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=/label-studio/data/files + - LABEL_STUDIO_USERNAME=${LS_USER:-admin@example.com} + - LABEL_STUDIO_PASSWORD=${LS_PASSWORD:-changeme} + +volumes: + label_studio_data: diff --git a/ai-templates/stacks/langflow/docker-compose.yml b/ai-templates/stacks/langflow/docker-compose.yml new file mode 100644 index 0000000..965b524 --- /dev/null +++ b/ai-templates/stacks/langflow/docker-compose.yml @@ -0,0 +1,18 @@ +version: "3.8" + +services: + langflow: + image: langflowai/langflow:latest + container_name: langflow + restart: unless-stopped + ports: + - "${LANGFLOW_PORT:-7860}:7860" + volumes: + - langflow_data:/app/langflow + environment: + - LANGFLOW_DATABASE_URL=sqlite:////app/langflow/langflow.db + - LANGFLOW_CONFIG_DIR=/app/langflow + - LANGFLOW_AUTO_LOGIN=${AUTO_LOGIN:-true} + +volumes: + langflow_data: diff --git a/ai-templates/stacks/litellm/docker-compose.yml b/ai-templates/stacks/litellm/docker-compose.yml new file mode 100644 index 0000000..e381fbb --- /dev/null +++ b/ai-templates/stacks/litellm/docker-compose.yml @@ -0,0 +1,33 @@ +version: "3.8" + +services: + litellm: + image: ghcr.io/berriai/litellm:main-latest + container_name: litellm + restart: unless-stopped + ports: + - "${LITELLM_PORT:-4000}:4000" + volumes: + - litellm_config:/app/config + environment: + - LITELLM_MASTER_KEY=${LITELLM_MASTER_KEY:-sk-master-key} + - LITELLM_LOG_LEVEL=${LOG_LEVEL:-INFO} + - DATABASE_URL=postgresql://${PG_USER:-litellm}:${PG_PASSWORD:-litellm}@litellm-db:5432/${PG_DB:-litellm} + command: --config /app/config/litellm_config.yaml --port 4000 + depends_on: + - litellm-db + + litellm-db: + image: postgres:16-alpine + container_name: litellm-db + restart: unless-stopped + environment: + - POSTGRES_USER=${PG_USER:-litellm} + - POSTGRES_PASSWORD=${PG_PASSWORD:-litellm} + - POSTGRES_DB=${PG_DB:-litellm} + volumes: + - litellm_pg_data:/var/lib/postgresql/data + +volumes: + litellm_config: + litellm_pg_data: diff --git a/ai-templates/stacks/localai/docker-compose.yml b/ai-templates/stacks/localai/docker-compose.yml new file mode 100644 index 0000000..9c5f8fe --- /dev/null +++ b/ai-templates/stacks/localai/docker-compose.yml @@ -0,0 +1,25 @@ +version: "3.8" + +services: + localai: + image: localai/localai:latest-gpu-nvidia-cuda-12 + container_name: localai + restart: unless-stopped + ports: + - "${LOCALAI_PORT:-8080}:8080" + volumes: + - localai_models:/build/models + environment: + - THREADS=${THREADS:-4} + - CONTEXT_SIZE=${CONTEXT_SIZE:-4096} + - MODELS_PATH=/build/models + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [gpu] + +volumes: + localai_models: diff --git a/ai-templates/stacks/mlflow/docker-compose.yml b/ai-templates/stacks/mlflow/docker-compose.yml new file mode 100644 index 0000000..958504b --- /dev/null +++ b/ai-templates/stacks/mlflow/docker-compose.yml @@ -0,0 +1,20 @@ +version: "3.8" + +services: + mlflow: + image: ghcr.io/mlflow/mlflow:latest + container_name: mlflow + restart: unless-stopped + ports: + - "${MLFLOW_PORT:-5000}:5000" + volumes: + - mlflow_data:/mlflow + command: > + mlflow server + --host 0.0.0.0 + --port 5000 + --backend-store-uri sqlite:///mlflow/mlflow.db + --default-artifact-root /mlflow/artifacts + +volumes: + mlflow_data: diff --git a/ai-templates/stacks/n8n-ai/docker-compose.yml b/ai-templates/stacks/n8n-ai/docker-compose.yml new file mode 100644 index 0000000..30ac80e --- /dev/null +++ b/ai-templates/stacks/n8n-ai/docker-compose.yml @@ -0,0 +1,20 @@ +version: "3.8" + +services: + n8n: + image: docker.n8n.io/n8nio/n8n:latest + container_name: n8n-ai + restart: unless-stopped + ports: + - "${N8N_PORT:-5678}:5678" + volumes: + - n8n_data:/home/node/.n8n + environment: + - N8N_BASIC_AUTH_ACTIVE=${N8N_AUTH:-true} + - N8N_BASIC_AUTH_USER=${N8N_USER:-admin} + - N8N_BASIC_AUTH_PASSWORD=${N8N_PASSWORD:-changeme} + - WEBHOOK_URL=${WEBHOOK_URL:-http://localhost:5678/} + - N8N_AI_ENABLED=true + +volumes: + n8n_data: diff --git a/ai-templates/stacks/ollama/docker-compose.yml b/ai-templates/stacks/ollama/docker-compose.yml new file mode 100644 index 0000000..a10b813 --- /dev/null +++ b/ai-templates/stacks/ollama/docker-compose.yml @@ -0,0 +1,25 @@ +version: "3.8" + +services: + ollama: + image: ollama/ollama:latest + container_name: ollama + restart: unless-stopped + ports: + - "${OLLAMA_PORT:-11434}:11434" + volumes: + - ollama_data:/root/.ollama + environment: + - OLLAMA_HOST=0.0.0.0 + - OLLAMA_NUM_PARALLEL=${OLLAMA_NUM_PARALLEL:-4} + - OLLAMA_MAX_LOADED_MODELS=${OLLAMA_MAX_LOADED_MODELS:-2} + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [gpu] + +volumes: + ollama_data: diff --git a/ai-templates/stacks/open-webui/docker-compose.yml b/ai-templates/stacks/open-webui/docker-compose.yml new file mode 100644 index 0000000..709f69f --- /dev/null +++ b/ai-templates/stacks/open-webui/docker-compose.yml @@ -0,0 +1,39 @@ +version: "3.8" + +services: + open-webui: + image: ghcr.io/open-webui/open-webui:main + container_name: open-webui + restart: unless-stopped + ports: + - "${OPEN_WEBUI_PORT:-3000}:8080" + volumes: + - open_webui_data:/app/backend/data + environment: + - OLLAMA_BASE_URL=${OLLAMA_BASE_URL:-http://ollama:11434} + - WEBUI_SECRET_KEY=${WEBUI_SECRET_KEY:-changeme} + - ENABLE_SIGNUP=${ENABLE_SIGNUP:-true} + depends_on: + - ollama + + ollama: + image: ollama/ollama:latest + container_name: ollama + restart: unless-stopped + ports: + - "${OLLAMA_PORT:-11434}:11434" + volumes: + - ollama_data:/root/.ollama + environment: + - OLLAMA_HOST=0.0.0.0 + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [gpu] + +volumes: + open_webui_data: + ollama_data: diff --git a/ai-templates/stacks/qdrant/docker-compose.yml b/ai-templates/stacks/qdrant/docker-compose.yml new file mode 100644 index 0000000..03ca69c --- /dev/null +++ b/ai-templates/stacks/qdrant/docker-compose.yml @@ -0,0 +1,19 @@ +version: "3.8" + +services: + qdrant: + image: qdrant/qdrant:latest + container_name: qdrant + restart: unless-stopped + ports: + - "${QDRANT_HTTP_PORT:-6333}:6333" + - "${QDRANT_GRPC_PORT:-6334}:6334" + volumes: + - qdrant_data:/qdrant/storage + - qdrant_snapshots:/qdrant/snapshots + environment: + - QDRANT__SERVICE__API_KEY=${QDRANT_API_KEY:-} + +volumes: + qdrant_data: + qdrant_snapshots: diff --git a/ai-templates/stacks/stable-diffusion-webui/docker-compose.yml b/ai-templates/stacks/stable-diffusion-webui/docker-compose.yml new file mode 100644 index 0000000..b4592de --- /dev/null +++ b/ai-templates/stacks/stable-diffusion-webui/docker-compose.yml @@ -0,0 +1,25 @@ +version: "3.8" + +services: + stable-diffusion-webui: + image: universonic/stable-diffusion-webui:latest + container_name: stable-diffusion-webui + restart: unless-stopped + ports: + - "${SD_PORT:-7860}:7860" + volumes: + - sd_data:/data + - sd_output:/output + environment: + - CLI_ARGS=${CLI_ARGS:---listen --api --xformers} + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [gpu] + +volumes: + sd_data: + sd_output: diff --git a/ai-templates/stacks/text-generation-webui/docker-compose.yml b/ai-templates/stacks/text-generation-webui/docker-compose.yml new file mode 100644 index 0000000..cb65de8 --- /dev/null +++ b/ai-templates/stacks/text-generation-webui/docker-compose.yml @@ -0,0 +1,35 @@ +version: "3.8" + +services: + text-gen-webui: + image: atinoda/text-generation-webui:default-nvidia + container_name: text-generation-webui + restart: unless-stopped + ports: + - "${WEBUI_PORT:-7860}:7860" + - "${API_PORT:-5000}:5000" + - "${STREAM_PORT:-5005}:5005" + volumes: + - tgw_characters:/app/characters + - tgw_loras:/app/loras + - tgw_models:/app/models + - tgw_presets:/app/presets + - tgw_prompts:/app/prompts + - tgw_extensions:/app/extensions + environment: + - EXTRA_LAUNCH_ARGS=${EXTRA_LAUNCH_ARGS:---listen --api} + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [gpu] + +volumes: + tgw_characters: + tgw_loras: + tgw_models: + tgw_presets: + tgw_prompts: + tgw_extensions: diff --git a/ai-templates/stacks/vllm/docker-compose.yml b/ai-templates/stacks/vllm/docker-compose.yml new file mode 100644 index 0000000..4b8c06d --- /dev/null +++ b/ai-templates/stacks/vllm/docker-compose.yml @@ -0,0 +1,29 @@ +version: "3.8" + +services: + vllm: + image: vllm/vllm-openai:latest + container_name: vllm + restart: unless-stopped + ports: + - "${VLLM_PORT:-8000}:8000" + volumes: + - vllm_cache:/root/.cache/huggingface + environment: + - HUGGING_FACE_HUB_TOKEN=${HF_TOKEN:-} + command: > + --model ${MODEL_NAME:-meta-llama/Llama-3.1-8B-Instruct} + --max-model-len ${MAX_MODEL_LEN:-4096} + --gpu-memory-utilization ${GPU_MEM_UTIL:-0.90} + --tensor-parallel-size ${TENSOR_PARALLEL:-1} + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [gpu] + ipc: host + +volumes: + vllm_cache: diff --git a/ai-templates/stacks/weaviate/docker-compose.yml b/ai-templates/stacks/weaviate/docker-compose.yml new file mode 100644 index 0000000..df41b85 --- /dev/null +++ b/ai-templates/stacks/weaviate/docker-compose.yml @@ -0,0 +1,22 @@ +version: "3.8" + +services: + weaviate: + image: cr.weaviate.io/semitechnologies/weaviate:latest + container_name: weaviate + restart: unless-stopped + ports: + - "${WEAVIATE_HTTP_PORT:-8080}:8080" + - "${WEAVIATE_GRPC_PORT:-50051}:50051" + volumes: + - weaviate_data:/var/lib/weaviate + environment: + - QUERY_DEFAULTS_LIMIT=25 + - AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED=${ANON_ACCESS:-true} + - PERSISTENCE_DATA_PATH=/var/lib/weaviate + - DEFAULT_VECTORIZER_MODULE=${VECTORIZER:-none} + - CLUSTER_HOSTNAME=node1 + - ENABLE_MODULES=${MODULES:-text2vec-transformers,generative-openai} + +volumes: + weaviate_data: diff --git a/ai-templates/stacks/whisper/docker-compose.yml b/ai-templates/stacks/whisper/docker-compose.yml new file mode 100644 index 0000000..6a04b81 --- /dev/null +++ b/ai-templates/stacks/whisper/docker-compose.yml @@ -0,0 +1,19 @@ +version: "3.8" + +services: + whisper: + image: onerahmet/openai-whisper-asr-webservice:latest-gpu + container_name: whisper-asr + restart: unless-stopped + ports: + - "${WHISPER_PORT:-9000}:9000" + environment: + - ASR_MODEL=${ASR_MODEL:-base} + - ASR_ENGINE=${ASR_ENGINE:-openai_whisper} + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [gpu]