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

相关推荐
TizzyGoodhealth5 小时前
从零到一搭建Spring‑AI原生Tool‑Calling AI Agent|架构对比+完整实战源码+踩坑实录
java·ai·知识库·rag·ai agent·spring ai
Raas1008 小时前
MAI Gateway (魔芋企业级AI网关) 私有化部署全攻略:AI网关怎么部署?附架构图
人工智能·安全·大模型·gateway·ai网关·mai gateway
hoaxxcj18 小时前
零能力 Agent 骗过评测实测:朴素 harness 被骗 75%,加固后仍漏掉「抄答案」
网络·安全·大模型·工程化·ai实战
大模型丫丫20 小时前
RAGFlow:开源、可深度定制的企业级 RAG 应用开发引擎
开源·rag
小七-七牛开发者1 天前
Agent 小知识|Agent 环境工程:部分可观测性、状态转移与执行隔离
ai·大模型·agent·claude·token·工作流·skill·claudecode·ai coding
console.log('npc')1 天前
DeepSeek Harness 使用教程
大模型·ai编程·deepseek·harness
大数据点灯人1 天前
【大模型】深度解答:OOV 与 Tokenizer 词汇表共用问题
人工智能·深度学习·ai·大模型·transformer
寻道码路1 天前
大模型工程化实战(三):LLM 灰度发布 + 自动熔断,1% 流量试错、指标劣化自动回滚
大模型·mlops·ai工程化·llm灰度发布·自动熔断·金丝雀·生产落地