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

相关推荐
模型启动机2 小时前
Google推出托管MCP服务器,让AI Agent轻松接入其工具生态
运维·人工智能·ai·大模型
谁怕平生太急2 小时前
一些大模型算法的面试QA
大模型
人工智能培训3 小时前
DNN案例一步步构建深层神经网络(二)
人工智能·神经网络·大模型·dnn·具身智能·智能体·大模型学习
找方案4 小时前
我的 all-in-rag 学习笔记:初识 RAG—— 让 AI 从 “闭卷考试“ 变 “开卷考“
人工智能·笔记·学习·rag·all-in-rag
人工智能培训20 小时前
什么是基于大模型的智能体构建?
人工智能·深度学习·大模型·具身智能·智能体·智能体构建·大模型智能体
Heyxy21 小时前
RobustMerge—— 无训练的 PEFT 模型融合方法,从低秩分解视角揭示方向鲁棒性对 PEFT 融合的作用
人工智能·深度学习·机器学习·大模型
Sherlock Ma21 小时前
AI大模型面试题集锦:(1)基础入门题
人工智能·pytorch·自然语言处理·大模型·跳槽·机器翻译·改行学it
梁辰兴1 天前
OpenAI更新ChatGPT Images:生成速度最高提升4倍,原生多模态模型
人工智能·科技·ai·chatgpt·大模型·openai·图像生成
被制作时长两年半的个人练习生1 天前
【大模型】happy-llm笔记
笔记·大模型·llm