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

相关推荐
ACCELERATOR_LLC2 小时前
【DataWhale组队学习】DIY-LLM Task2 PyTorch 与资源核算
人工智能·pytorch·深度学习·大模型
knight_9___4 小时前
RAG面试题5
人工智能·python·agent·rag
刘大猫.4 小时前
OpenAI通过两个开源模型GPT-OSS-120B和GPT-OSS-20B重新拥抱开放性
人工智能·gpt·大模型·openai·算力·gpt-oss-120b·gpt-oss-20b
倘来之遇5 小时前
GraphRAG 深度解析:从原理到实战
llm·rag·graphrag
九章智算云9 小时前
一份CLAUDE.md,为何能让GitHub榜首项目狂揽6万星?
人工智能·ai·大模型·agent·ai工具·claude code·vibe-coding
谷哥的小弟10 小时前
大模型核心基础知识(02)—大模型的主要特征与能力边界
人工智能·深度学习·机器学习·大模型·智能体
程序员鱼皮11 小时前
RAG 是什么?16 种 RAG 方案一次讲清!AI 应用开发必学 | 万字干货
ai·程序员·编程·ai编程·rag
谷哥的小弟12 小时前
大模型核心基础知识(01)—大模型的发展历程与技术演进
人工智能·深度学习·机器学习·大模型·智能体
xiaotao13112 小时前
03-深度学习基础:指令微调与RLHF
人工智能·深度学习·大模型·指令微调