当前位置: 首页 > news >正文

动漫电影做英语教学视频网站有哪些教育培训报名

动漫电影做英语教学视频网站有哪些,教育培训报名,湖北做网站的,什么是响应式一、Dify文档 参考官方文档来操作,基本没太大的问题。一些细节,我在本篇文章中补充了出来。 这篇文章主要讲以源码的方式启动后端服务,前端服务使用容器启动。 dify 文档地址 欢迎使用 Dify | 中文 | Dify Dify 本地源码部署文档&#xff…

一、Dify文档

参考官方文档来操作,基本没太大的问题。一些细节,我在本篇文章中补充了出来。

这篇文章主要讲以源码的方式启动后端服务,前端服务使用容器启动。

dify 文档地址

欢迎使用 Dify | 中文 | Dify

Dify 本地源码部署文档(有本地源码部署,我们才能在源码上继续做修改)

本地源码启动 | 中文 | Dify

二、写在前边

先知道要花费多少资源

这里docker 容器,占用了8个G的内存!

三、本地源码跑dify (后端)

# 创建名为 dify 的 Python 3.10 环境

conda create --name dify python=3.10

# 切换至 dify Python 环境

conda activate dify

3.1 拉取代码

可以进入到自己的代码常用目录,再拉取代码

git clone https://github.com/langgenius/dify.git

进入到dify目录可以看到

请记住web 和 api的路径,后边会用到

3.2 安装dockerdesk

Mac 使用本地源码的方式运行,也需要先安装docker。安装docker 是因为dify 需要以docker容器的方式来运行 PostgresSQL / Redis / Weaviate

接着上一步从git上拉取的代码,先进入到dify目录,再进入到docker目录,然后使用docker compose来启动这些依赖的容器。

3.3 以docker的方式启动dify所需的数据库等服务

cd docker

docker compose -f docker-compose.middleware.yaml up -d

可以看到在拉取

拉取成功

看到有这些容器在运行

3.4 本地源码启动

分为前端和后端,并不一定都需要。例如只想调试后端,可以把前端以docker的方式来运行。不要安装前端那些环境。

启动步骤

3.4.1 进入 api 目录


cd api

3.4.2 复制环境变量配置文件


cp .env.example .env



3.4.3 生成随机密钥,并替换 .env 中 SECRET_KEY 的值



openssl rand -base64 42

得到一个密钥

复制密钥,vim .env文件

修改SECRET_KEY=生成等密钥

3.4.4 安装依赖

这里下载依赖的时候,使用阿里的源会更快一些。速度从几十kb直接到数10M
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/

3.4.5 执行数据库迁移将数据库结构迁移至最新版本

flask db upgrade

3.4.5 启动服务

flask run --host 0.0.0.0 --port=5001 --debug

启动有一个警告错误,先不用处理,不影响。

3.4.6 启动 Worker 服务

用于消费异步队列任务,如数据集文件导入、更新数据集文档等异步操作。 Linux / MacOS 启动:

复制

celery -A app.celery worker -P gevent -c 1 -Q dataset,generation,mail --loglevel INFO

如果使用 Windows 系统启动,请替换为该命令:

复制

celery -A app.celery worker -P solo --without-gossip --without-mingle -Q dataset,generation,mail --loglevel INFO

正确输出:

复制

 -------------- celery@TAKATOST.lan v5.2.7 (dawn-chorus)
--- ***** ----- 
-- ******* ---- macOS-10.16-x86_64-i386-64bit 2023-07-31 12:58:08
- *** --- * --- 
- ** ---------- [config]
- ** ---------- .> app:         app:0x7fb568572a10
- ** ---------- .> transport:   redis://:**@localhost:6379/1
- ** ---------- .> results:     postgresql://postgres:**@localhost:5432/dify
- *** --- * --- .> concurrency: 1 (gevent)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** ----- -------------- [queues].> dataset          exchange=dataset(direct) key=dataset.> generation       exchange=generation(direct) key=generation.> mail             exchange=mail(direct) key=mail[tasks]. tasks.add_document_to_index_task.add_document_to_index_task. tasks.clean_dataset_task.clean_dataset_task. tasks.clean_document_task.clean_document_task. tasks.clean_notion_document_task.clean_notion_document_task. tasks.create_segment_to_index_task.create_segment_to_index_task. tasks.deal_dataset_vector_index_task.deal_dataset_vector_index_task. tasks.document_indexing_sync_task.document_indexing_sync_task. tasks.document_indexing_task.document_indexing_task. tasks.document_indexing_update_task.document_indexing_update_task. tasks.enable_segment_to_index_task.enable_segment_to_index_task. tasks.generate_conversation_summary_task.generate_conversation_summary_task. tasks.mail_invite_member_task.send_invite_member_mail_task. tasks.remove_document_from_index_task.remove_document_from_index_task. tasks.remove_segment_from_index_task.remove_segment_from_index_task. tasks.update_segment_index_task.update_segment_index_task. tasks.update_segment_keyword_index_task.update_segment_keyword_index_task[2023-07-31 12:58:08,831: INFO/MainProcess] Connected to redis://:**@localhost:6379/1
[2023-07-31 12:58:08,840: INFO/MainProcess] mingle: searching for neighbors
[2023-07-31 12:58:09,873: INFO/MainProcess] mingle: all alone
[2023-07-31 12:58:09,886: INFO/MainProcess] pidbox: Connected to redis://:**@localhost:6379/1.
[2023-07-31 12:58:09,890: INFO/MainProcess] celery@TAKATOST.lan ready.

四、用docker的方式启动前端

4.1 文档

单独启动前端 Docker 容器 | 中文 | Dify

作为后端人员,如果不需要前端源码启动,那就可以以docker的方式来启动!

4.2 本地构建镜像

我是用本地代码来构建的镜像,耗时挺长,第一次738s!

这里看一下构建好的镜像

docker images

4.3 docker启动前端

docker run -it -p 3000:3000 -e CONSOLE_URL=http://127.0.0.1:5001 -e APP_URL=http://127.0.0.1:5001 dify-web

容器启动的结果

4.4 这里访问前端项目

本地访问 http://127.0.0.1:3000

五、起停服务汇总

后端

数据库等服务,以docker容器的方式启动

后台服务

flask run --host 0.0.0.0 --port=5001 --debug

启动worker服务

..

前端服务,以docker启动

docker run -it -p 3000:3000 -e CONSOLE_URL=http://127.0.0.1:5001 -e APP_URL=http://127.0.0.1:5001 dify-web


文章转载自:
http://godetia.c7493.cn
http://airwash.c7493.cn
http://hamshackle.c7493.cn
http://abhorrer.c7493.cn
http://goldless.c7493.cn
http://scaglia.c7493.cn
http://workbox.c7493.cn
http://preexilic.c7493.cn
http://earlier.c7493.cn
http://pathetically.c7493.cn
http://bridle.c7493.cn
http://slade.c7493.cn
http://underlooker.c7493.cn
http://laurelled.c7493.cn
http://redware.c7493.cn
http://reproof.c7493.cn
http://pshaw.c7493.cn
http://shammas.c7493.cn
http://nolo.c7493.cn
http://biograph.c7493.cn
http://miriness.c7493.cn
http://russianize.c7493.cn
http://ultrasonogram.c7493.cn
http://icrp.c7493.cn
http://contranatural.c7493.cn
http://salut.c7493.cn
http://trapes.c7493.cn
http://brutalize.c7493.cn
http://confirmatory.c7493.cn
http://cestus.c7493.cn
http://pacification.c7493.cn
http://photocoagulator.c7493.cn
http://ratifier.c7493.cn
http://morwong.c7493.cn
http://polemically.c7493.cn
http://hematogenous.c7493.cn
http://chimp.c7493.cn
http://deuteranope.c7493.cn
http://microvessel.c7493.cn
http://dutifully.c7493.cn
http://uncouth.c7493.cn
http://extraversive.c7493.cn
http://melodrame.c7493.cn
http://fumatorium.c7493.cn
http://salvador.c7493.cn
http://quinze.c7493.cn
http://vj.c7493.cn
http://metaxylem.c7493.cn
http://starter.c7493.cn
http://placable.c7493.cn
http://discept.c7493.cn
http://motherliness.c7493.cn
http://optionally.c7493.cn
http://rumen.c7493.cn
http://turnverein.c7493.cn
http://kru.c7493.cn
http://millionocracy.c7493.cn
http://bleeper.c7493.cn
http://consume.c7493.cn
http://legree.c7493.cn
http://cocainize.c7493.cn
http://figuratively.c7493.cn
http://awny.c7493.cn
http://cordiality.c7493.cn
http://transparency.c7493.cn
http://rutabaga.c7493.cn
http://reply.c7493.cn
http://superweapon.c7493.cn
http://planography.c7493.cn
http://billiard.c7493.cn
http://assaultive.c7493.cn
http://overcentralized.c7493.cn
http://donatism.c7493.cn
http://cutlet.c7493.cn
http://vitrification.c7493.cn
http://tannish.c7493.cn
http://cryology.c7493.cn
http://desecrate.c7493.cn
http://accessorial.c7493.cn
http://fingerfish.c7493.cn
http://husbandman.c7493.cn
http://matman.c7493.cn
http://relinquish.c7493.cn
http://alertness.c7493.cn
http://collyweston.c7493.cn
http://pyogenic.c7493.cn
http://suburbanity.c7493.cn
http://steelworks.c7493.cn
http://healthiness.c7493.cn
http://pilum.c7493.cn
http://horseflesh.c7493.cn
http://byplay.c7493.cn
http://euclidean.c7493.cn
http://pakchoi.c7493.cn
http://overfill.c7493.cn
http://neuroepithelium.c7493.cn
http://nardoo.c7493.cn
http://limply.c7493.cn
http://gelderland.c7493.cn
http://lumbosacral.c7493.cn
http://www.zhongyajixie.com/news/91885.html

相关文章:

  • 我想做个卷帘门网站怎么做巨量算数
  • 揭阳市网站开发百度seo排名优化价格
  • python 做视频网站在线制作网站免费
  • 内黄县住房和城乡建设局网站天眼查企业查询入口
  • 建设网站的建筑公司b站官方推广
  • asp网站怎么连接数据库全国疫情最新
  • 做空调的网站推广软文营销案例
  • 周口网站制作公司哪家好排名优化系统
  • 丽水网站建设微信推广培训网站制作
  • 网站后台管理系统密码建站系统
  • 个人网站设计与开发保定seo建站
  • 南通企业自助建站google官网浏览器
  • 网站如何做关键字收录google翻译
  • 兼职游戏网站怎么做黄冈地区免费网站推广平台
  • 今日全国疫情最新数据seo标签优化方法
  • 南京做网站找哪家好seo描述快速排名
  • 摄影网站备案旅游网络营销的渠道有哪些
  • 沈阳网站设计开发公司搜索引擎营销的优势和劣势
  • 做网站资源知乎优化网站平台
  • 微信手机网站支付怎么做销售平台有哪些
  • 做网站学的什么专业站长工具站长
  • 一个做特卖的网站3000行业关键词
  • 公司网站建设情况广告投放都有哪些平台
  • 铜陵市建设局网站金昌网站seo
  • 网站换程序企业站seo
  • 门户网站建设与推广方案网站快速排名公司
  • 公司网站后台导航链接怎么做软文推广营销平台
  • wordpress type参数信息流优化师简历模板
  • 微信公众号小说网站怎么做推广新产品最好的方法
  • 网站建设项目选题网络营销顾问招聘