部署
开发
-
使用源代码自己构建包
- 克隆 GPT4All 并更改目录:
git clone --recurse-submodules https://github.com/nomic-ai/gpt4all.git cd gpt4all/gpt4all-backend
- 构建后端。
如果使用的是 Windows 并安装了 Visual Studio:
cmake -B build cmake --build build --parallel --config RelWithDebInfo
对于所有其他平台:
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo cmake --build build --parallel
RelWithDebInfo
是一个很好的默认值,但您也可以根据情况使用 或。ReleaseDebug
如果提示cmake版本过期
-
去官网下载最新版本的cmake
-
执行.sh安装命令
bash cmake-3.20.6-inux-x86_64.sh --skip-licence --prefix=/usr
# 安装过程中遇到: # 第一个选择时,输入y!!! Do you accept the license? [yn]: # 输入 y # 第二个选择时,输入n!!! By default the CMake will be installed in: "/usr/cmake-3.23.0-linux-x86_64" Do you want to include the subdirectory cmake-3.23.0-linux-x86_64? Saying no will install in: "/usr" [Yn]: # 输入 n
-
查看cmake版本
cmake --version
- 安装 Python 包:
cd ../../gpt4all-bindings/python pip install -e .
- 根据文档编写相关代码:Generation - GPT4All Documentation
子模块下载失败了:git submodule update --init --recursive
文章评论