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

相关推荐
海天一色y1 小时前
RAG 优化实战:从精确召回、QA 生成到上下文压缩的全链路工程化方法
rag·agent开发
程序猿编码1 小时前
不用 GPU!RK3588 跑视觉大模型,Qwen3.5-2B VLM 端侧落地
大模型·llm·rk3588·qwen·推理·vlm
一颗无畏豆儿3 小时前
关于常用AI工具和大模型的总结
ai·大模型·llm·ai工具
XianMing的博客5 小时前
《Attention Is All You Need》学习记录(从零吃透版)
人工智能·大模型
韩曙亮5 小时前
【AI 大模型】各 AI 大厂 Agent 平台各等级订阅会员对比分析 ( 字节 TRAE、腾讯 Buddy、阿里 Qoder CN、百度 DuMate )
人工智能·ai·大模型·ai大模型·qoder·workbuddy·traecode
五仁火烧5 小时前
大模型开发: MCP
java·大模型·mcp
lie..7 小时前
30天从零开始学AI应用开发(Day 1):机器学习、深度学习、大模型,到底是个啥关系
人工智能·python·大模型
赋创小助手7 小时前
Qwen3.8-27B 本地推理 Benchmark 解析:llama.cpp、vLLM、SGLang 与长 Context 的性能差异
服务器·人工智能·大模型·qwen·vllm·sglang·context长度
梦想的颜色8 小时前
【AI科普】AI 时代,纯 H5+CSS PK React & Vue:前端技术孰优孰劣深入剖析
ai·前端框架·大模型·vue·react·html5·vibecoding
孟郎郎9 小时前
Windows 环境使用 OpenCode 配置使用大模型
人工智能·windows·ai·大模型·开源软件·opencode