发布应用 Ollama OpenWebUI

Signed-off-by: Meng Sen <qyg2297248353@gmail.com>
This commit is contained in:
2025-02-10 16:10:01 +08:00
parent 0c329fcebe
commit cfc65df208
22 changed files with 523 additions and 0 deletions
+71
View File
@@ -0,0 +1,71 @@
additionalProperties:
formFields:
- default: "/home/ollama"
edit: true
envKey: OLLAMA_ROOT_PATH
labelZh: 数据持久化路径
labelEn: Data persistence path
required: true
type: text
- default: 11434
edit: true
envKey: PANEL_APP_PORT_HTTP
labelZh: WebUI 端口
labelEn: WebUI port
required: true
rule: paramPort
type: number
- default: 1
edit: true
envKey: OLLAMA_MAX_LOADED_MODELS
labelZh: 最大加载模型数量
labelEn: Maximum number of loaded models
required: true
rule: paramPort
type: number
- default: 512
edit: true
envKey: OLLAMA_MAX_QUEUE
labelZh: 最大队列长度
labelEn: Maximum queue length
required: true
rule: paramPort
type: number
- default: "1"
edit: true
envKey: OLLAMA_NUM_PARALLEL
labelZh: 并行推理数量
labelEn: Number of parallel inferences
required: true
type: select
values:
- label: 1
value: "1"
- label: 4
value: "4"
- default: "f16"
edit: true
envKey: OLLAMA_KV_CACHE_TYPE
labelZh: 缓存类型
labelEn: Cache type
required: true
type: select
values:
- label: f16
value: "f16"
- label: q8_0
value: "q8_0"
- label: q4_0
value: "q4_0"
- default: "0"
edit: true
envKey: OLLAMA_FLASH_ATTENTION
labelZh: 启用 Flash Attention
labelEn: Enable Flash Attention
required: true
type: select
values:
- label: 启用
value: "1"
- label: 禁用
value: "0"
+45
View File
@@ -0,0 +1,45 @@
networks:
1panel-network:
external: true
services:
ollama:
image: ollama/ollama:0.5.7
container_name: ${CONTAINER_NAME}
labels:
createdBy: "Apps"
restart: always
networks:
- 1panel-network
deploy:
resources:
reservations:
devices:
- capabilities:
- gpu
devices:
- /dev/dri:/dev/dri
# - /dev/kfd:/dev/kfd
# - /dev/nvidia0:/dev/nvidia0
# - /dev/nvidiactl:/dev/nvidiactl
# - /dev/nvidia-modeset:/dev/nvidia-modeset
# - /dev/nvidia-nvswitchctl:/dev/nvidia-nvswitchctl
# - /dev/nvidia-uvm:/dev/nvidia-uvm
# - /dev/nvidia-uvm-tools:/dev/nvidia-uvm-tools
# - /dev/video11:/dev/video11
ports:
- ${PANEL_APP_PORT_HTTP}:11434
env_file:
- ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env}
- ${ENV_FILE:-/etc/1panel/envs/default.env}
volumes:
- ${OLLAMA_ROOT_PATH}/data:/root/.ollama
environment:
- TZ=Asia/Shanghai
- OLLAMA_HOST=0.0.0.0
- OLLAMA_PORT=11434
- OLLAMA_MAX_LOADED_MODELS=1
- OLLAMA_NUM_PARALLEL=1
- OLLAMA_MAX_QUEUE=512
- OLLAMA_FLASH_ATTENTION=0
- OLLAMA_KV_CACHE_TYPE=f16
+2
View File
@@ -0,0 +1,2 @@
# copyright© 2024 XinJiang Ms Studio
ENV_FILE=.env
+2
View File
@@ -0,0 +1,2 @@
# copyright© 2024 XinJiang Ms Studio
TZ=Asia/Shanghai
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
if [ -f .env ]; then
source .env
# setup-1 add default values
CURRENT_DIR=$(pwd)
sed -i '/^ENV_FILE=/d' .env
sed -i '/^GLOBAL_ENV_FILE=/d' .env
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi
+10
View File
@@ -0,0 +1,10 @@
#!/bin/bash
if [ -f .env ]; then
source .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
if [ -f .env ]; then
source .env
# setup-1 add default values
CURRENT_DIR=$(pwd)
sed -i '/^ENV_FILE=/d' .env
sed -i '/^GLOBAL_ENV_FILE=/d' .env
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi
+96
View File
@@ -0,0 +1,96 @@
# Ollama
一站式大模型部署平台
<img height="128px" src="https://file.lifebus.top/apps/ollama/logo.png" width="128px"/>
![](https://img.shields.io/badge/%E6%96%B0%E7%96%86%E8%90%8C%E6%A3%AE%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%E5%B7%A5%E4%BD%9C%E5%AE%A4-%E6%8F%90%E4%BE%9B%E6%8A%80%E6%9C%AF%E6%94%AF%E6%8C%81-blue)
## 模型列表
Ollama支持可用的型号列表 [ollama.com/library](https://ollama.com/library 'Ollama 模型库)
下面是一些可以下载的示例模型:
| Model | Parameters | Size | Download |
|--------------------|------------|-------|----------------------------------|
| DeepSeek-R1 | 7B | 4.7GB | `ollama run deepseek-r1` |
| DeepSeek-R1 | 671B | 404GB | `ollama run deepseek-r1:671b` |
| Llama 3.3 | 70B | 43GB | `ollama run llama3.3` |
| Llama 3.2 | 3B | 2.0GB | `ollama run llama3.2` |
| Llama 3.2 | 1B | 1.3GB | `ollama run llama3.2:1b` |
| Llama 3.2 Vision | 11B | 7.9GB | `ollama run llama3.2-vision` |
| Llama 3.2 Vision | 90B | 55GB | `ollama run llama3.2-vision:90b` |
| Llama 3.1 | 8B | 4.7GB | `ollama run llama3.1` |
| Llama 3.1 | 405B | 231GB | `ollama run llama3.1:405b` |
| Phi 4 | 14B | 9.1GB | `ollama run phi4` |
| Phi 3 Mini | 3.8B | 2.3GB | `ollama run phi3` |
| Gemma 2 | 2B | 1.6GB | `ollama run gemma2:2b` |
| Gemma 2 | 9B | 5.5GB | `ollama run gemma2` |
| Gemma 2 | 27B | 16GB | `ollama run gemma2:27b` |
| Mistral | 7B | 4.1GB | `ollama run mistral` |
| Moondream 2 | 1.4B | 829MB | `ollama run moondream` |
| Neural Chat | 7B | 4.1GB | `ollama run neural-chat` |
| Starling | 7B | 4.1GB | `ollama run starling-lm` |
| Code Llama | 7B | 3.8GB | `ollama run codellama` |
| Llama 2 Uncensored | 7B | 3.8GB | `ollama run llama2-uncensored` |
| LLaVA | 7B | 4.5GB | `ollama run llava` |
| Solar | 10.7B | 6.1GB | `ollama run solar` |
> 您应该至少有8 GB的RAM来运行7B型号,16 GB来运行13B型号,32 GB来运行33B型号。
## 基本命令
### 拉取一个模型
```sh
ollama pull llama3.2
```
此命令也可用于更新本地模型。仅拉取差异。
### 移除一个模型
```sh
ollama rm llama3.2
```
### 复制一个模型
```sh
ollama cp llama3.2 my-model
```
### 显示模型信息
```sh
ollama show llama3.2
```
### 列出你电脑上的所有模型
```sh
ollama list
```
### 列出当前已加载的模型
```sh
ollama ps
```
### 停止正在运行的模型
```sh
ollama stop llama3.2
```
### 启动 Ollama
```sh
ollama serve
```
---
![Ms Studio](https://file.lifebus.top/imgs/ms_blank_001.png)
+15
View File
@@ -0,0 +1,15 @@
additionalProperties:
key: ollama
name: Ollama
tags:
- WebSite
- AI
- Local
shortDescZh: 一站式大模型部署平台
shortDescEn: Get up and running with large language models
type: website
crossVersionUpdate: true
limit: 0
website: https://ollama.com/
github: https://github.com/ollama/ollama/
document: https://ollama.com/
Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB