首页 最新 热门 推荐

  • 首页
  • 最新
  • 热门
  • 推荐

【AI】ubuntu平台docker部署open-webui,配置模型 中文 提示词

  • 25-04-24 14:24
  • 3047
  • 8371
blog.csdn.net

前提:

ollama本地部署的,采用内网地址通知到open-webui

调整ollama.service

配置监听地址

Environment="OLLAMA_HOST=:11434"

避免监听127.0.0.1:11434

  1. [Unit]
  2. Description=Ollama Service
  3. After=network-online.target
  4. [Service]
  5. ExecStart=/usr/local/bin/ollama serve
  6. User=ollama
  7. Group=ollama
  8. Restart=always
  9. RestartSec=3
  10. Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
  11. Environment="OLLAMA_HOST=:11434"
  12. [Install]
  13. WantedBy=default.target

安装

docker-compose.yml配置

  1. version: '3.8'
  2. services:
  3. open-webui:
  4. image: ghcr.nju.edu.cn/open-webui/open-webui:main
  5. container_name: open-webui
  6. ports:
  7. - "3000:8080"
  8. environment:
  9. - OLLAMA_BASE_URL=http://192.168.1.3:11434
  10. volumes:
  11. - open-webui_data:/app/backend/data
  12. restart: always
  13. volumes:
  14. open-webui_data:

注意采用 ghcr.nju.edu.cn 加速地址

启动服务

docker-compose up -d
  1. yeqiang@yeqiang-Default-string:/usr/local/open-webui$ docker-compose up -d
  2. Pulling open-webui (ghcr.nju.edu.cn/open-webui/open-webui:main)...
  3. main: Pulling from open-webui/open-webui
  4. c29f5b76f736: Pull complete
  5. 73c4bbda278d: Pull complete
  6. acc53c3e87ac: Pull complete
  7. ad3b14759e4f: Pull complete
  8. b874b4974f13: Pull complete
  9. 4f4fb700ef54: Pull complete
  10. dfcf69fcbc2b: Pull complete
  11. e8bfaf4ee0e0: Pull complete
  12. 17b8c991f4f9: Pull complete
  13. 2d1f3e8f8037: Pull complete
  14. 9bc058e9f913: Pull complete
  15. 4ec78f0a5387: Pull complete
  16. 8362126344e9: Pull complete
  17. 8fbadd293f58: Pull complete
  18. 00f8bd1845fc: Pull complete
  19. Digest: sha256:1623214ac0c180cc1f527df3c2cb2be69bd0911016a565edc15e91b4e6ab99dd
  20. Status: Downloaded newer image for ghcr.nju.edu.cn/open-webui/open-webui:main
  21. Creating open-webui ... done

日志

  1. yeqiang@yeqiang-Default-string:/usr/local/open-webui$ docker logs -f b89
  2. Loading WEBUI_SECRET_KEY from file, not provided as an environment variable.
  3. Generating WEBUI_SECRET_KEY
  4. Loading WEBUI_SECRET_KEY from .webui_secret_key
  5. /app/backend/open_webui
  6. /app/backend
  7. /app
  8. Running migrations
  9. INFO [alembic.runtime.migration] Context impl SQLiteImpl.
  10. INFO [alembic.runtime.migration] Will assume non-transactional DDL.
  11. INFO [alembic.runtime.migration] Running upgrade -> 7e5b5dc7342b, init
  12. INFO [alembic.runtime.migration] Running upgrade 7e5b5dc7342b -> ca81bd47c050, Add config table
  13. INFO [alembic.runtime.migration] Running upgrade ca81bd47c050 -> c0fbf31ca0db, Update file table
  14. INFO [alembic.runtime.migration] Running upgrade c0fbf31ca0db -> 6a39f3d8e55c, Add knowledge table
  15. INFO [alembic.runtime.migration] Running upgrade 6a39f3d8e55c -> 242a2047eae0, Update chat table
  16. INFO [alembic.runtime.migration] Running upgrade 242a2047eae0 -> 1af9b942657b, Migrate tags
  17. INFO [alembic.runtime.migration] Running upgrade 1af9b942657b -> 3ab32c4b8f59, Update tags
  18. INFO [alembic.runtime.migration] Running upgrade 3ab32c4b8f59 -> c69f45358db4, Add folder table
  19. INFO [alembic.runtime.migration] Running upgrade c69f45358db4 -> c29facfe716b, Update file table path
  20. INFO [alembic.runtime.migration] Running upgrade c29facfe716b -> af906e964978, Add feedback table
  21. INFO [alembic.runtime.migration] Running upgrade af906e964978 -> 4ace53fd72c8, Update folder table and change DateTime to BigInteger for timestamp fields
  22. INFO [alembic.runtime.migration] Running upgrade 4ace53fd72c8 -> 922e7a387820, Add group table
  23. INFO [alembic.runtime.migration] Running upgrade 922e7a387820 -> 57c599a3cb57, Add channel table
  24. INFO [alembic.runtime.migration] Running upgrade 57c599a3cb57 -> 7826ab40b532, Update file table
  25. INFO [alembic.runtime.migration] Running upgrade 7826ab40b532 -> 3781e22d8b01, Update message & channel tables
  26. INFO [open_webui.env] 'DEFAULT_LOCALE' loaded from the latest database entry
  27. INFO [open_webui.env] 'DEFAULT_PROMPT_SUGGESTIONS' loaded from the latest database entry
  28. WARNI [open_webui.env]
  29. WARNING: CORS_ALLOW_ORIGIN IS SET TO '*' - NOT RECOMMENDED FOR PRODUCTION DEPLOYMENTS.
  30. INFO [open_webui.env] Embedding model set: sentence-transformers/all-MiniLM-L6-v2
  31. WARNI [langchain_community.utils.user_agent] USER_AGENT environment variable not set, consider setting it to identify your requests.
  32. INFO: Started server process [1]
  33. INFO: Waiting for application startup.
  34. INFO: Application startup complete.
  35. INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
  36. Creating knowledge table
  37. Migrating data from document table to knowledge table
  38. Converting 'chat' column to JSON
  39. Renaming 'chat' column to 'old_chat'
  40. Adding new 'chat' column of type JSON
  41. Dropping 'old_chat' column
  42. Primary Key: {'name': None, 'constrained_columns': []}
  43. Unique Constraints: [{'name': 'uq_id_user_id', 'column_names': ['id', 'user_id']}]
  44. Indexes: [{'name': 'tag_id', 'column_names': ['id'], 'unique': 1, 'dialect_options': {}}]
  45. Creating new primary key with 'id' and 'user_id'.
  46. Dropping unique constraint: uq_id_user_id
  47. Dropping unique index: tag_id
  48. ___ __ __ _ _ _ ___
  49. / _ \ _ __ ___ _ __ \ \ / /__| |__ | | | |_ _|
  50. | | | | '_ \ / _ \ '_ \ \ \ /\ / / _ \ '_ \| | | || |
  51. | |_| | |_) | __/ | | | \ V V / __/ |_) | |_| || |
  52. \___/| .__/ \___|_| |_| \_/\_/ \___|_.__/ \___/|___|
  53. |_|
  54. v0.5.12 - building the best open-source AI user interface.
  55. https://github.com/open-webui/open-webui

注意,会在WARNING: CORS_ALLOW_ORIGIN IS SET TO '*' - NOT RECOMMENDED FOR PRODUCTION DEPLOYMENTS.卡上一段时间,估计下载资源。

使用

耐心等待一段时间(白屏),显示更新信息

左下角,用户名,打开管理员面板

设置,外部链接,关闭OpenAI API(没有梯子,避免卡界面)

切换到模型配置

点击模型,配置提示词,配置公开(其他用户就可以看到,如果只有自己,不用公开来)

  1. 你是一位经验丰富的高级程序员、架构师及项目经理,精通多种编程语言和技术框架。你的任务是为我提供专业的程序开发指导,包括但不限于项目架构设计、代码编写最佳实践、技术选型建议以及团队管理技巧。
  2. 请始终使用中文回答我的问题,并根据我的具体需求给出详细、清晰的解释和建议。例如,当我询问如何优化一段代码时,请从性能、可读性、维护性等多个角度进行分析,并提供具体的改进方案;当我咨询关于项目管理的问题时,请结合实际案例分享有效的管理策略和方法。
  3. 此外,请时刻关注最新的技术趋势和最佳实践,以便给我最前沿的指导。如果涉及到特定的技术或工具,请简要介绍其背景知识,以帮助我更好地理解你的建议。
  4. 现在,请准备好开始解答我的问题。

注:本文转载自blog.csdn.net的hkNaruto的文章"https://blog.csdn.net/hknaruto/article/details/145666582"。版权归原作者所有,此博客不拥有其著作权,亦不承担相应法律责任。如有侵权,请联系我们删除。
复制链接
复制链接
相关推荐
发表评论
登录后才能发表评论和回复 注册

/ 登录

评论记录:

未查询到任何数据!
回复评论:

分类栏目

后端 (14832) 前端 (14280) 移动开发 (3760) 编程语言 (3851) Java (3904) Python (3298) 人工智能 (10119) AIGC (2810) 大数据 (3499) 数据库 (3945) 数据结构与算法 (3757) 音视频 (2669) 云原生 (3145) 云平台 (2965) 前沿技术 (2993) 开源 (2160) 小程序 (2860) 运维 (2533) 服务器 (2698) 操作系统 (2325) 硬件开发 (2491) 嵌入式 (2955) 微软技术 (2769) 软件工程 (2056) 测试 (2865) 网络空间安全 (2948) 网络与通信 (2797) 用户体验设计 (2592) 学习和成长 (2593) 搜索 (2744) 开发工具 (7108) 游戏 (2829) HarmonyOS (2935) 区块链 (2782) 数学 (3112) 3C硬件 (2759) 资讯 (2909) Android (4709) iOS (1850) 代码人生 (3043) 阅读 (2841)

热门文章

130
用户体验设计
关于我们 隐私政策 免责声明 联系我们
Copyright © 2020-2025 蚁人论坛 (iYenn.com) All Rights Reserved.
Scroll to Top