【AI】ubuntu平台docker摆设open-webui,设置模子 中文 提示词 ...

打印 上一主题 下一主题

主题 905|帖子 905|积分 2715

前提:

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 加速地点
启动服务
  1. 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. 现在,请准备好开始解答我的问题。
复制代码




免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

罪恶克星

金牌会员
这个人很懒什么都没写!

标签云

快速回复 返回顶部 返回列表