Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template Ollama Added #604

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added templates/ollama/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added templates/ollama/assets/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions templates/ollama/index.ts
Original file line number Diff line number Diff line change
@@ -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 };
}
97 changes: 97 additions & 0 deletions templates/ollama/meta.yaml
Original file line number Diff line number Diff line change
@@ -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