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

相关推荐
一枕槐安48711 小时前
RAG 服务扛住高并发:缓存、队列、限流三件套
java·spring·缓存·异步任务·rag·断路器
学IT的周星星13 小时前
LangGraph:用「流程图」的方式编排 Agent
数据库·人工智能·大模型·llm·流程图·agent
Maiko Star14 小时前
【HM-LC】LangChain RAG查询优化详解:查询重写、混合检索与重排序实战
langchain·rag
yz_aiks16 小时前
chrome-use 使用教程:让 Claude Code 操控已登录的 Chrome(禅道、ONES 实测)
chrome·自动化·大模型·ai agent
AI闲人18 小时前
Hermes:把学习写进文件,把知识变成技能
人工智能·知识库·ai 编程·企业ai落地
虎鲸不是鱼18 小时前
AI 自动化逆向(三十五)假设空间枚举的完备性是假设出来的
人工智能·自动化·大模型·逆向·ai逆向
Lin屿18 小时前
RAG第一步文档解析
rag
发量惊人的中年网工19 小时前
做 AI 应用怎么选大模型 API?选项应该看哪几点?
人工智能·ai·大模型
QuZhengRong20 小时前
【AI】大模型推理中 KV Cache 原理解析
人工智能·大模型·agent·提示词·推理
爱吃饼干的熊猫1 天前
OpenAI 发布 GPT-6.1 Terra:视觉推理 + 电脑操作二合一,API 价格腰斩
大模型