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

相关推荐
OpenCSG4 小时前
【活动预告】2025斗拱开发者大会,共探支付与AI未来
人工智能·ai·开源·大模型·支付安全
万俟淋曦7 小时前
【论文速递】2025年第28周(Jul-06-12)(Robotics/Embodied AI/LLM)
人工智能·ai·机器人·大模型·论文·robotics·具身智能
梵得儿SHI12 小时前
Prompt Engineering 核心知识:从基础模式到思维链,掌握大模型高效交互秘籍
大模型·prompt·交互·提示词·对话·大模型提问艺术·极简指令
deephub15 小时前
REFRAG技术详解:如何通过压缩让RAG处理速度提升30倍
人工智能·python·大语言模型·rag
ZHOU_WUYI16 小时前
AgentScope RAG 示例指南
agent·rag
hzp66616 小时前
Magnus:面向大规模机器学习工作负载的综合数据管理方法
人工智能·深度学习·机器学习·大模型·llm·数据湖·大数据存储
musicwind16 小时前
fastgpt 社区版探究:mongo db 全文检索算法探秘
科技·fastgpt·rag·mongo db
尽兴-1 天前
【10 分钟!M4 Mac mini 离线部署「私有 ChatGPT」完整实录】
macos·ai·chatgpt·大模型·ollama·私有化
桃子叔叔1 天前
从0到1讲解大模型中的关键步骤(一)分词、词性标注、命名实体识别
人工智能·大模型·多模态
Paraverse_徐志斌1 天前
RAG架构(检索增强生成)与向量数据库
数据库·ai·llm·embedding·milvus·rag