网站首页 > 博客文章 正文
大家好,今天我们来看看如何利用源码在windows进行本地部署大模型anythingllm。
1.安装 node.js
https://nodejs.org/en/download/prebuilt-installer
2.安装 yarn
npm install -g yarn
3.git 源码拉取
git clone https://github.com/Mintplex-Labs/anything-llm.git
接下来是调试步骤,内容摘录至网络亲测有效,直接按照上面的步骤来,就能运行了,这里面要注意的是输入的命令请在git上面运行,不要在windows的cmd或powershell中运行。
Getting started
- Clone the repo into your server as the user who the application will run as. git clone git@github.com:Mintplex-Labs/anything-llm.git
- cd anything-llm and run yarn setup. This will install all dependencies to run in production as well as debug the application.
- cp server/.env.example server/.env to create the basic ENV file for where instance settings will be read from on service start.
- Ensure that the server/.env file has at least these keys to start. These values will persist and this file will be automatically written and managed after your first successful boot.
STORAGE_DIR="/your/absolute/path/to/server/storage"
- Edit the frontend/.env file for the VITE_BASE_API to now be set to /api. This is documented in the .env for which one you should use.
# VITE_API_BASE='http://localhost:3001/api' # Use this URL when developing locally
# VITE_API_BASE="https://$CODESPACE_NAME-3001.$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN/api" # for Github Codespaces
VITE_API_BASE='/api' # Use this URL deploying on non-localhost address OR in docker.
To start the application
AnythingLLM is comprised of three main sections. The frontend, server, and collector. When running in production you will be running server and collector on two different processes, with a build step for compilation of the frontend.
- Build the frontend application. cd frontend && yarn build - this will produce a frontend/dist folder that will be used later.
- Copy frontend/dist to server/public - cp -R frontend/dist server/public. This should create a folder in server named public which contains a top level index.html file and various other files/folders.
(optional) Build native LLM support if using native as your LLM. cd server && npx --no node-llama-cpp download
- Migrate and prepare your database file.
cd server && npx prisma generate --schema=./prisma/schema.prisma
cd server && npx prisma migrate deploy --schema=./prisma/schema.prisma
- Boot the server in production cd server && NODE_ENV=production node index.js &
- Boot the collection in another process cd collector && NODE_ENV=production node index.js &
AnythingLLM should now be running on http://localhost:3001!
好了,下面就是打开界面进行配置操作了。
错误解决
解决yarn install 一直处在Building fresh packages…
1.打开 C:\Users\用户名.yarnrc
添加
registry "https://registry.npmmirror.com"
sass_binary_site "https://npmmirror.com/mirrors/node-sass/"
phantomjs_cdnurl "http://cnpmjs.org/downloads"
electron_mirror "https://npmmirror.com/mirrors/electron/"
sqlite3_binary_host_mirror "https://foxgis.oss-cn-shanghai.aliyuncs.com/"
profiler_binary_host_mirror "https://npmmirror.com/mirrors/node-inspector/"
chromedriver_cdnurl "https://npmmirror.com/mirrors/chromedriver/"
感谢小伙伴们的支持,希望得到大家的关注和点赞,我们下期见。
猜你喜欢
- 2024-11-17 应用号,传统APP的革命?(应用号不存在是什么意思)
- 2024-11-17 带你重新认识身边的前端工程师(前端工程师干什么的)
- 2024-11-17 Axure有哪些鲜为人知的使用技巧?(axure详细教程)
- 2024-11-17 英特尔 Evo 认证 PC 对决 M1 Macbook:x86 生态加持,Evo 更省心
- 2024-11-17 手把手教你搭建漂亮好看的个人网站
- 2024-11-17 高保真原型应保真到什么程度?(高保真原型应保真到什么程度才能用)
- 2024-11-17 如何提高npm 下载依赖过慢的问题(npm下载包)
- 2024-11-17 Linux 下源码安装Kong(基于数据Postgres)
- 2024-11-17 NPM升级package.json中的版本号以及更换数据源
- 2024-11-17 Node实战001:Windows搭建Node开发环境
你 发表评论:
欢迎- 最近发表
- 标签列表
-
- powershellfor (55)
- messagesource (56)
- aspose.pdf破解版 (56)
- promise.race (63)
- 2019cad序列号和密钥激活码 (62)
- window.performance (66)
- qt删除文件夹 (72)
- mysqlcaching_sha2_password (64)
- ubuntu升级gcc (58)
- nacos启动失败 (64)
- ssh-add (70)
- jwt漏洞 (58)
- macos14下载 (58)
- yarnnode (62)
- abstractqueuedsynchronizer (64)
- source~/.bashrc没有那个文件或目录 (65)
- springboot整合activiti工作流 (70)
- jmeter插件下载 (61)
- 抓包分析 (60)
- idea创建mavenweb项目 (65)
- vue回到顶部 (57)
- qcombobox样式表 (68)
- vue数组concat (56)
- tomcatundertow (58)
- pastemac (61)
本文暂时没有评论,来添加一个吧(●'◡'●)