Synced apps from source repository via GitHub Actions

This commit is contained in:
QYG2297248353
2025-03-12 09:21:32 +00:00
parent 7d5bafb4e2
commit 46deb131b6
82 changed files with 11 additions and 11 deletions
+21
View File
@@ -0,0 +1,21 @@
# 数据持久化路径 [必填]
OLLAMA_ROOT_PATH=/home/ollama
# WebUI 端口 [必填]
PANEL_APP_PORT_HTTP=11434
# 最大加载模型数量 [必填]
OLLAMA_MAX_LOADED_MODELS=1
# 最大队列长度 [必填]
OLLAMA_MAX_QUEUE=512
# 并行推理数量 [必填]
OLLAMA_NUM_PARALLEL=1
# 缓存类型 [必填]
OLLAMA_KV_CACHE_TYPE=f16
# 启用 Flash Attention [必填]
OLLAMA_FLASH_ATTENTION=0
+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"
+31
View File
@@ -0,0 +1,31 @@
networks:
1panel-network:
external: true
services:
ollama:
container_name: ollama
devices:
- /dev/dri:/dev/dri
env_file:
- ./envs/global.env
- .env
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
image: ollama/ollama:0.6.0
labels:
createdBy: Apps
networks:
- 1panel-network
ports:
- ${PANEL_APP_PORT_HTTP}:11434
restart: always
tty: true
volumes:
- ${OLLAMA_ROOT_PATH}/data:/root/.ollama
+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