From f9eeb5dde4ddcdb91965f47b9df3f2c986acaacf Mon Sep 17 00:00:00 2001 From: okxlin Date: Tue, 21 May 2024 02:11:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0open-webui=E5=88=B0?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/open-webui/README.md | 57 ++++++++++++++++++++ apps/open-webui/data.yml | 19 +++++++ apps/open-webui/gpu-cuda/.env.sample | 4 ++ apps/open-webui/gpu-cuda/data.yml | 31 +++++++++++ apps/open-webui/gpu-cuda/docker-compose.yml | 29 ++++++++++ apps/open-webui/logo.png | Bin 0 -> 1199 bytes apps/open-webui/main/.env.sample | 4 ++ apps/open-webui/main/data.yml | 31 +++++++++++ apps/open-webui/main/docker-compose.yml | 23 ++++++++ 9 files changed, 198 insertions(+) create mode 100644 apps/open-webui/README.md create mode 100644 apps/open-webui/data.yml create mode 100644 apps/open-webui/gpu-cuda/.env.sample create mode 100644 apps/open-webui/gpu-cuda/data.yml create mode 100644 apps/open-webui/gpu-cuda/docker-compose.yml create mode 100644 apps/open-webui/logo.png create mode 100644 apps/open-webui/main/.env.sample create mode 100644 apps/open-webui/main/data.yml create mode 100644 apps/open-webui/main/docker-compose.yml diff --git a/apps/open-webui/README.md b/apps/open-webui/README.md new file mode 100644 index 00000000..70932c99 --- /dev/null +++ b/apps/open-webui/README.md @@ -0,0 +1,57 @@ +# 使用说明 + +- 首次注册的账户即为管理员账户。 + +- **安装 `gpu` 版本时,`1Panel` `v1.10.3-lts`以下版本会覆盖`docker-compose.yml`的`gpu`设置,所以最好安装完成后检查一下,** + **不对则用以下覆盖并在应用目录下手动执行`docker-compose down && docker-compose up -d`。** + +``` +version: '3.3' +services: + open-webui: + image: ghcr.io/open-webui/open-webui:cuda + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:8080" + environment: + - NVIDIA_VISIBLE_DEVICES=all + - OLLAMA_BASE_URL=${OLLAMA_BASE_URL} + - OPENAI_API_KEY=${OPENAI_API_KEY} + deploy: + resources: + reservations: + devices: + - capabilities: [gpu] + extra_hosts: + - "host.docker.internal:host-gateway" + volumes: + - "${DATA_PATH}:/app/backend/data" + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true + +``` + +# 原始相关 +*** + +# Open WebUI (Formerly Ollama WebUI) 👋 + +![GitHub stars](https://img.shields.io/github/stars/open-webui/open-webui?style=social) +![GitHub forks](https://img.shields.io/github/forks/open-webui/open-webui?style=social) +![GitHub watchers](https://img.shields.io/github/watchers/open-webui/open-webui?style=social) +![GitHub repo size](https://img.shields.io/github/repo-size/open-webui/open-webui) +![GitHub language count](https://img.shields.io/github/languages/count/open-webui/open-webui) +![GitHub top language](https://img.shields.io/github/languages/top/open-webui/open-webui) +![GitHub last commit](https://img.shields.io/github/last-commit/open-webui/open-webui?color=red) +![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Follama-webui%2Follama-wbui&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false) +[![Discord](https://img.shields.io/badge/Discord-Open_WebUI-blue?logo=discord&logoColor=white)](https://discord.gg/5rJgQTnV4s) +[![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/tjbck) + +Open WebUI is an extensible, feature-rich, and user-friendly self-hosted WebUI designed to operate entirely offline. It supports various LLM runners, including Ollama and OpenAI-compatible APIs. For more information, be sure to check out our [Open WebUI Documentation](https://docs.openwebui.com/). \ No newline at end of file diff --git a/apps/open-webui/data.yml b/apps/open-webui/data.yml new file mode 100644 index 00000000..7327cd5a --- /dev/null +++ b/apps/open-webui/data.yml @@ -0,0 +1,19 @@ +name: Open WebUI +tags: + - AI / 大模型 +title: 大语言模型 (LLMs) 的用户友好型网络界面 +description: 大语言模型 (LLMs) 的用户友好型网络界面 +additionalProperties: + key: open-webui + name: Open WebUI + tags: + - AI + shortDescZh: 大语言模型 (LLMs) 的用户友好型网络界面 + shortDescEn: User-friendly WebUI for LLMs + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://openwebui.com + github: https://github.com/open-webui/open-webui + document: https://docs.openwebui.com diff --git a/apps/open-webui/gpu-cuda/.env.sample b/apps/open-webui/gpu-cuda/.env.sample new file mode 100644 index 00000000..1d59dcd3 --- /dev/null +++ b/apps/open-webui/gpu-cuda/.env.sample @@ -0,0 +1,4 @@ +CONTAINER_NAME="open-webui" +OLLAMA_BASE_URL="" +OPENAI_API_KEY="" +PANEL_APP_PORT_HTTP="40245" diff --git a/apps/open-webui/gpu-cuda/data.yml b/apps/open-webui/gpu-cuda/data.yml new file mode 100644 index 00000000..0eb45e1c --- /dev/null +++ b/apps/open-webui/gpu-cuda/data.yml @@ -0,0 +1,31 @@ +additionalProperties: + formFields: + - default: 40245 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: "" + edit: true + envKey: OLLAMA_BASE_URL + labelEn: Ollama Base URL (example:https://example.com) + labelZh: Ollama 基础 URL (例:https://example.com) + required: false + type: text + - default: "" + edit: true + envKey: OPENAI_API_KEY + labelEn: OpenAI API Key + labelZh: OpenAI API 密钥 + required: false + type: password + - default: ./data + edit: true + envKey: DATA_PATH + labelEn: Data Path + labelZh: 数据路径 + required: true + type: text diff --git a/apps/open-webui/gpu-cuda/docker-compose.yml b/apps/open-webui/gpu-cuda/docker-compose.yml new file mode 100644 index 00000000..5bb05146 --- /dev/null +++ b/apps/open-webui/gpu-cuda/docker-compose.yml @@ -0,0 +1,29 @@ +version: '3.3' +services: + open-webui: + image: ghcr.io/open-webui/open-webui:cuda + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:8080" + environment: + - NVIDIA_VISIBLE_DEVICES=all + - OLLAMA_BASE_URL=${OLLAMA_BASE_URL} + - OPENAI_API_KEY=${OPENAI_API_KEY} + deploy: + resources: + reservations: + devices: + - capabilities: [gpu] + extra_hosts: + - "host.docker.internal:host-gateway" + volumes: + - "${DATA_PATH}:/app/backend/data" + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/open-webui/logo.png b/apps/open-webui/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..379e298efc57a2857be3b437061119d3995c4f7b GIT binary patch literal 1199 zcmeAS@N?(olHy`uVBq!ia0vp^TR@nD8Ax&oe*=;X^8y)zw!7T$TV z>fbx}U*W7g8;n(21e`b&(TN}8-wtM`&K5pzV3VG;{+#3NOVLt=M;2_3xc(|Y=1iQ) zqLO2$B7QwrI(D}Mv)s}ucyz7{# z?FIEGTdZO=+I%khYS?l0*c!X~3zlaG{+oa6S*M)r7Vi=^_tXzF)U8^Q0$!NaoELhl zd~UIhTWRW#CdDZG>CcYN(>bqmvG{9r_usR&(_Z)=aXs3%&eD5J=ML>uAHE=`+-f12I?+x68Vk zw)o7&rTTj}or+=n8M$Ys{j4=L$K5Vw{M-D|=gh@j-m)_#0$+Mhtd}&KaBxj*tLy#! zIj=lkJ_}FvXSjIJNh^E1k+ftTcX~zkzO`4TO}xKOn_0hNZ|qaE=YOvKoFzNqMOwUD z=pDAN?!T*Zwd{8ozSWKKIvKEdX9?T=