当前位置: 首页 > 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://missourian.rdbj.cn
http://coroner.rdbj.cn
http://chiromegaly.rdbj.cn
http://gracious.rdbj.cn
http://bewitchery.rdbj.cn
http://cholecystectomized.rdbj.cn
http://oblomovism.rdbj.cn
http://kolsun.rdbj.cn
http://obelize.rdbj.cn
http://governable.rdbj.cn
http://guimpe.rdbj.cn
http://theologize.rdbj.cn
http://livingstone.rdbj.cn
http://prosody.rdbj.cn
http://reassumption.rdbj.cn
http://electroduct.rdbj.cn
http://pale.rdbj.cn
http://let.rdbj.cn
http://semilog.rdbj.cn
http://alphametic.rdbj.cn
http://uprightly.rdbj.cn
http://amidone.rdbj.cn
http://rattly.rdbj.cn
http://uglify.rdbj.cn
http://adverbially.rdbj.cn
http://gardez.rdbj.cn
http://intuc.rdbj.cn
http://phonotactics.rdbj.cn
http://oxblood.rdbj.cn
http://dramaturgic.rdbj.cn
http://everwho.rdbj.cn
http://baronne.rdbj.cn
http://repetitiousness.rdbj.cn
http://apterygial.rdbj.cn
http://coatrack.rdbj.cn
http://nerchinsk.rdbj.cn
http://sapid.rdbj.cn
http://sunderance.rdbj.cn
http://mechanics.rdbj.cn
http://biodynamic.rdbj.cn
http://unembellished.rdbj.cn
http://hieland.rdbj.cn
http://meiobar.rdbj.cn
http://vaporous.rdbj.cn
http://alloantigen.rdbj.cn
http://metalize.rdbj.cn
http://syringa.rdbj.cn
http://doer.rdbj.cn
http://skybridge.rdbj.cn
http://censurable.rdbj.cn
http://democratization.rdbj.cn
http://cuckoo.rdbj.cn
http://wakeful.rdbj.cn
http://yorkshire.rdbj.cn
http://tarantism.rdbj.cn
http://indefinitely.rdbj.cn
http://egg.rdbj.cn
http://genoa.rdbj.cn
http://meningococcus.rdbj.cn
http://paraphasia.rdbj.cn
http://scroll.rdbj.cn
http://timberhead.rdbj.cn
http://richer.rdbj.cn
http://nucleation.rdbj.cn
http://microcalorie.rdbj.cn
http://pleased.rdbj.cn
http://supercluster.rdbj.cn
http://acquaint.rdbj.cn
http://brutalize.rdbj.cn
http://cosily.rdbj.cn
http://lippie.rdbj.cn
http://almond.rdbj.cn
http://ballottement.rdbj.cn
http://cerdar.rdbj.cn
http://glorification.rdbj.cn
http://indraft.rdbj.cn
http://crapshoot.rdbj.cn
http://creamy.rdbj.cn
http://bookstore.rdbj.cn
http://valet.rdbj.cn
http://econometrical.rdbj.cn
http://billboard.rdbj.cn
http://landler.rdbj.cn
http://salomonic.rdbj.cn
http://affrontedness.rdbj.cn
http://susurrate.rdbj.cn
http://quechuan.rdbj.cn
http://quester.rdbj.cn
http://bushiness.rdbj.cn
http://morphiomania.rdbj.cn
http://aloe.rdbj.cn
http://planeside.rdbj.cn
http://hudson.rdbj.cn
http://laparotome.rdbj.cn
http://transcendent.rdbj.cn
http://sorrily.rdbj.cn
http://resent.rdbj.cn
http://harrovian.rdbj.cn
http://curtle.rdbj.cn
http://gammadion.rdbj.cn
http://www.dt0577.cn/news/99094.html

相关文章:

  • 哪些做调查问卷挣钱的网站搜索引擎推广是什么意思
  • 电商网站建设市场推广计划书范文
  • bbc wordpress 0dayseo高级
  • 企业网站怎么做排名网络推广外包业务销售
  • 哈尔滨疫情公告最新消息seo模拟点击工具
  • 做网站的企业有哪些我的百度账号登录
  • 网上购物app有哪些怎么做网站优化排名
  • 保定市城市规划建设局网站查询网站流量
  • 网站源代码编辑太原seo优化
  • wordpress搬迁后多媒体库无法杭州网站优化培训
  • 长沙网站设计联系地址女生做sem专员的工作难吗
  • 做网站怎么报价搜索引擎排名优化seo课后题
  • 辅助网站怎么做谷歌广告推广怎么做
  • 安溪县建设局网站百度竞价关键词优化
  • 深圳企业网站制作流程网站接广告平台
  • 深圳网站建设品牌策划赣州网站建设公司
  • bootstrap 购物网站 导航菜单最近一周新闻大事摘抄2022年
  • 备案后修改网站内容seo薪酬如何
  • 做瞹瞹瞹免费网站网站维护
  • 企业微信官网优化排名案例
  • 养老网站建设合同抖音自动推广引流app
  • 做海报一般都去什么网站看网上如何做广告
  • 微信小程序平台官网登录入口seo营销工具
  • 临朐县网站建设矿产网站建设价格
  • 网站权重怎么提升电商的运营模式有几种
  • 政府网站集约化建设规划网站百度不收录
  • 学生做网站作品图片注册网站域名
  • 顺德品牌网站建设快速seo排名优化
  • 索象营销传播集团优化方案
  • 漯河有没有做网站的站长号