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

相关推荐
dont worry about it1 小时前
2025年如何高效安全地在软件外包平台上接单
大模型·#程序员
applepie_max13 小时前
GraphRAG本地部署 v2.7.0
python·rag·graphrag
Python算法实战16 小时前
平安大模型面试题:Self-Attention 原理与多头注意力设计
人工智能·算法·自然语言处理·大模型·面试题
Python算法实战16 小时前
腾讯送命题:手写多头注意力机制。。。
人工智能·算法·面试·大模型·强化学习
小龙1 天前
【理论知识】Q/K/V权重矩阵学习笔记
矩阵·大模型·transformer·多头注意力机制·理论基础
花菜会噎住1 天前
Chainlit+LlamaIndex 多模态 RAG 开发实战7:从系统架构到功能落地,搞定 PDF/PPT/ 图片全类型文件处理
pdf·大模型·rag·llamaindex
文火冰糖的硅基工坊1 天前
[人工智能-大模型-29]:大模型应用层技术栈 - 第二层:Prompt 编排层(Prompt Orchestration)
人工智能·大模型·prompt·copilot
bestcxx1 天前
0.3、AI Agent 知识库、召回、Recall、Embedding等 相关的概念
embedding·知识库·dify·rag·ai agent·recall·召回
小龙2 天前
【基础理论】位置向量|位置编码学习笔记
大模型·transformer·基础理论·位置编码
小新学习屋2 天前
大模型-智能体-【篇四: Agent GPT 、AgentTuning、LangChain-Agent】
gpt·langchain·大模型·智能体