本地源码方式部署启动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

相关推荐
般若Neo4 小时前
大模型高效提示词Prompt编写指南
大模型·prompt·提示词
小阿鑫10 小时前
记录第一次公司内部分享:如何基于大模型搭建企业+AI业务
大模型·llm·agent·大模型落地·ai落地·mcp·mcpserver
Eastmount12 小时前
[论文阅读] (38)基于大模型的威胁情报分析与知识图谱构建论文总结(读书笔记)
论文阅读·人工智能·大模型·知识图谱·威胁情报
百里香酚兰14 小时前
【AI学习笔记】Coze工作流写入飞书多维表格(即:多维表格飞书官方插件使用教程)
笔记·学习·大模型·飞书·pe·coze
InternLM1 天前
基于InternLM的情感调节大师FunGPT
大模型·大语言模型·大模型应用·书生
sg_knight1 天前
大模型连接万物的“万能插座”:深度解析模型上下文协议MCP
人工智能·ai·大模型·agent·ai大模型·mcp·模型上下文协议
Json____1 天前
服装产品属性描述数据集(19197条),AI智能体知识库收集~
人工智能·数据集·知识库·ai训练·智能体·ai智能体·ai模型
小白跃升坊1 天前
Prompt 生产及提示词案例(含完整提示词)
ai·大语言模型·maxkb·提示词模版