diff --git a/templates/ollama/assets/logo.png b/templates/ollama/assets/logo.png new file mode 100644 index 00000000..20253c5f Binary files /dev/null and b/templates/ollama/assets/logo.png differ diff --git a/templates/ollama/assets/screenshot.png b/templates/ollama/assets/screenshot.png new file mode 100644 index 00000000..f6011ae0 Binary files /dev/null and b/templates/ollama/assets/screenshot.png differ diff --git a/templates/ollama/index.ts b/templates/ollama/index.ts new file mode 100644 index 00000000..6b3e3ddc --- /dev/null +++ b/templates/ollama/index.ts @@ -0,0 +1,53 @@ +import { Output, randomPassword, Services } from "~templates-utils"; +import { Input } from "./meta"; + +export function generate(input: Input): Output { + const services: Services = []; + const databasePassword = randomPassword(); + const redisPassword = randomPassword(); + + services.push({ + type: "app", + data: { + serviceName: input.appServiceName, + source: { type: "image", image: input.appServiceImage }, + domains: [{ host: "$(EASYPANEL_DOMAIN)", port: 11434 }], + + env: [`OLLAMA_KEEP_ALIVE=24h`, `OLLAMA_HOST=0.0.0.0`].join("\n"), + mounts: [ + { + type: "volume", + name: "data", + mountPath: "/data", + }, + ], + }, + }); + + services.push({ + type: "app", + data: { + serviceName: `${input.appServiceName}-web`, + source: { type: "image", image: input.uiServiceImage }, + domains: [{ host: "$(EASYPANEL_DOMAIN)", port: 80 }], + + env: [ + `OLLAMA_BASE_URLS=http://$(PROJECT_NAME)_${input.appServiceName}:11434`, + `ENV=dev`, + `WEBUI_AUTH=False`, + `WEBUI_NAME=${input.webuiName}`, + `WEBUI_URL=http://$(PRIMARY_DOMAIN)`, + `WEBUI_SECRET_KEY=t0p-s3cr3t`, + ].join("\n"), + mounts: [ + { + type: "volume", + name: "webui-data", + mountPath: "/app/backend/data", + }, + ], + }, + }); + + return { services }; +} diff --git a/templates/ollama/meta.yaml b/templates/ollama/meta.yaml new file mode 100644 index 00000000..e6a94f97 --- /dev/null +++ b/templates/ollama/meta.yaml @@ -0,0 +1,97 @@ +name: Ollama +description: + "Ollama is a powerful tool designed to simplify the deployment and interaction + with advanced AI models. It provides a streamlined solution for managing and + hosting large language models (LLMs) with an intuitive interface. Ollama + allows users to run queries and interact with models like OpenAI GPT and + others in a secure and efficient manner. The tool includes a web-based + interface that makes managing and testing models straightforward. Ollama is + designed to support diverse use cases, from research and development to + deploying AI capabilities in production systems. It offers flexible deployment + options, powerful API integrations, and role-based access control to ensure + secure and scalable AI solutions." +instructions: null +changeLog: + - date: 2024-11-16 + description: First Release +links: + - label: Website + url: https://ollama.com + - label: Docs + url: https://docs.ollama.com + - label: Github + url: https://github.com/Ollama/Ollama +contributors: + - name: Ahson Shaikh + url: https://github.com/Ahson-Shaikh +schema: + type: object + required: + - appServiceName + - appServiceImage + - uiServiceImage + - webuiName + properties: + appServiceName: + type: string + title: App Service Name + default: ollama + appServiceImage: + type: string + title: App Service Image + default: ollama/ollama:0.3.6 + uiServiceImage: + type: string + title: Ollama UI Service Image + default: ghcr.io/open-webui/open-webui:v0.3.35 + webuiName: + type: string + title: Ollama UI Name + default: Ollama +benefits: + - title: Simplified AI Deployment + description: + Ollama makes it easy to deploy and manage advanced AI models, enabling + users to focus on building and scaling AI applications efficiently. + - title: Secure Model Hosting + description: + Host AI models with enterprise-grade security, ensuring data privacy and + role-based access control for users and teams. + - title: Intuitive Web Interface + description: + Ollama provides a user-friendly web interface for managing AI models, + running queries, and testing capabilities without hassle. + - title: Flexible Deployment Options + description: + Deploy Ollama on your preferred infrastructure, whether it's cloud-based + or on-premises, to suit your organizational needs. + - title: API Integrations + description: + Ollama offers robust APIs for seamless integration with existing + applications and workflows, enabling AI-powered automation. +features: + - title: Manage AI Models + description: + Deploy, configure, and manage AI models effortlessly with Ollama’s + streamlined interface and tools. + - title: Interactive Query System + description: + Run queries and interact with hosted models to leverage AI for tasks like + natural language processing, data generation, and more. + - title: Web-Based UI + description: + Access a secure, feature-rich web UI to manage your AI models and interact + with them in real-time. + - title: Scalable Architecture + description: + Scale your AI deployments to handle increasing workloads without + compromising performance or security. + - title: Role-Based Access Control + description: + Control who can access and interact with the AI models using role-based + access permissions. +tags: + - AI + - LLM + - Machine Learning + - Custom Applications