本地源码方式部署启动MaxKB知识库问答系统

maxkb

https://github.com/1Panel-dev/MaxKB

安装 python

python 版本大于3.11

conda create -n mymaxkb python=3.12

pip install poetry

下载maxkb 安装

poetry install

构建 PostgreSQL docker

Dockerfile文件:

复制代码
# Use the official PostgreSQL 15 image as a base
FROM postgres:15

# Install necessary packages and clone the pgvector repository
RUN apt-get update && \
    apt-get install -y \
        postgresql-server-dev-15 \
        build-essential \
        git && \
    git clone https://github.com/pgvector/pgvector.git

# Build and install the pgvector extension
RUN cd pgvector && \
    make && \
    make install

# Clean up
RUN apt-get remove --purge -y \
        build-essential \
        git && \
    apt-get autoremove -y && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* /pgvector

# Set the default command to run when starting the container
CMD ["postgres"]

docker build --no-cache -t postgres-with-vector .

运行容器

docker run --name vpostgres -e POSTGRES_USER=root -e POSTGRES_PASSWORD=shunwukong -e POSTGRES_DB=maxkb -p 5433:5432 -d postgres-with-vector

验证安装:检查 pgvector 扩展文件是否安装正确

此命令应列出所有可用的扩展。专门查找 pgvector.control .

docker exec -it vpostgres ls /usr/share/postgresql/15/extension/

创建扩展:

docker exec -it vpostgres psql -U root -d maxkb -c "CREATE EXTENSION vector;"

验证扩展:

docker exec -it vpostgres psql -U root -d maxkb -c "\dx"


启动后端

python main.py start

启动前端

pnpm install

pnpm run dev

登陆

初始的账号admin 密码 MaxKB@123.. 登录之后会提示你修改密码

参考:

https://blog.csdn.net/weixin_50503886/article/details/139223782

https://github.com/1Panel-dev/MaxKB

相关推荐
java1234_小锋10 小时前
什么是 RAG(检索增强生成)?请简述 Spring AI 实现 RAG 的完整流程,包括涉及的核心组件。
java·人工智能·spring·rag
weixin_4684668511 小时前
大语言模型快速部署与调用指南
人工智能·ai·自然语言处理·大模型·云计算·大语言模型·本地化部署
xixixi7777712 小时前
Token 经济重构价值分配:中国移动成核心枢纽,算网安一体化按需计费普惠中小企业
人工智能·ai·大模型·云计算·算力·token·流量
中间件XL12 小时前
ai-agent框架spring ai/alibaba(四) RAG
rag·ai agent·智能体·spring ai
wtsolutions13 小时前
QMT 知识库 XtQuant知识库 使用文档 pdf
pdf·知识库·文档·qmt
极客小云13 小时前
【从 while 循环到可视化智能体:深入拆解 Agent Loop、Codex 风格工具调用、OpenClaw 与 Hermes 背后的技术细节】
数据库·python·大模型·agent·codex·openclaw·hermes
小草cys14 小时前
coding plan使用记录
大模型·coding plan
搞科研的小刘选手14 小时前
【南昌大学主办】第五届人工智能、物联网和云计算技术国际会议(AIoTC 2026)
人工智能·物联网·网络安全·大模型·云计算·智慧城市·云安全
是Yu欸15 小时前
抓取ChatGPT大模型回答并做品牌曝光分析
人工智能·经验分享·chatgpt·大模型·亮数据·brightdata
小碗羊肉15 小时前
【Agent笔记 | 第三篇】RAG优化
笔记·agent·rag