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

相关推荐
TGITCIC19 小时前
User Prompt 与 System Prompt:大模型沟通的“双引擎”机制深度拆解
人工智能·大模型·prompt·提示词·ai大模型·大模型ai·上下文工程
陈果然DeepVersion1 天前
Java大厂面试真题:从Spring Boot到AI微服务的三轮技术拷问
spring boot·redis·微服务·ai·智能客服·java面试·rag
陈果然DeepVersion1 天前
Java大厂面试真题:从Spring Boot到AI微服务的三轮技术拷问(二)
spring boot·redis·spring cloud·微服务·ai·java面试·rag
CoderJia程序员甲2 天前
GitHub 热榜项目 - 日榜(2025-11-11)
ai·开源·大模型·github·ai教程
only-code2 天前
MCP驱动的Rgentic RRG(向量数据库+网络搜索)
数据库·python·大模型·函数调用·mcp
居7然2 天前
详解监督微调(SFT):大模型指令遵循能力的核心构建方案
人工智能·分布式·架构·大模型·transformer
探模之翼3 天前
DeepSeek-OCR 部署、配置解析与测试完整指南
docker·大模型·ocr
c++服务器开发3 天前
掌握RAG系统的七个优秀GitHub存储库
人工智能·python·github·rag
不叫猫先生3 天前
基于华为昇腾CANN的自定义算子开发
华为·语言模型·大模型·cann