本地源码方式部署启动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 小时前
下载 llama2-7b-hf 全流程【小白踩坑记录】
大模型·llama2·大模型下载·llama-2-7b-hf
文艺倾年13 小时前
【大模型专栏—进阶篇】语言模型创新大总结——“后起之秀”
人工智能·pytorch·语言模型·自然语言处理·大模型
AI大模型_学习君19 小时前
3 种自然语言处理(NLP)技术:RNN、Transformers、BERT
人工智能·自然语言处理·大模型·llm·bert·大语言模型
Just_Paranoid21 小时前
828华为云征文|部署知识库问答系统 MaxKB
docker·llm·华为云·rag·anythingllm·ollama·maxkb
我爱学Python!2 天前
大模型教程:使用 Milvus、vLLM 和 Llama 3.1 搭建 RAG 应用
自然语言处理·大模型·llm·大语言模型·llama·milvus·rag
文艺倾年3 天前
【大模型专栏—进阶篇】语言模型创新大总结——“三派纷争”
人工智能·pytorch·语言模型·自然语言处理·大模型
阿里云大数据AI技术4 天前
阿里云Elasticsearch AI搜索实践
人工智能·elasticsearch·阿里云·rag
奔跑草-4 天前
【拥抱AI】沉浸式体验SpaCy开源分词器
人工智能·大模型·数据清洗·rag·spacy·数据分词
CodeDevMaster4 天前
基于基础模型BERT与大语言模型ChatGLM3-6B实现文本分类、信息抽取、文本匹配等任务
语言模型·大模型·llm·bert·chatglm3-6b·基础模型
loong_XL5 天前
reader-lm:小模型 html转markdown
前端·大模型·html·markdown