Q1:stack overflow

Q1:stack overflow,第1张

Now I have a project and I think it can be divided into three different modules like below.

project
│   README.md
│ 
└───flask_web
│   └───app_folder
│	|	└───  ...
|	|	└───  ...
|	|	|	__init__.py
|	|
│   │   app_run.py
│   └───venv
│       └──bin        
|	
│      
└───Fate
|	└─── ...
|	└───env
|		└───python36
|			└───venv
|				└───bin
|
└───fake_data_algorithm
	└─── ...
	└───venv
		└───bin

The first part ‘web’ is a flask application providing web service, it requires a virtual environment.

The second part ‘fate’ is a open source project for federal learning and also needs a virtual environment.If I want to start the system for federal learning process, I have to source ‘fate/bin/init_env.sh’ to activate the providing environment.

The third part ‘fake_data_algorithm’ is used to generate fake data based on the ‘data’ folder, which also requires virtual env for some python packages.

Because the after the ‘web’ application getting the request from browser, it will call
‘fate’ or ‘fake_data_algorithm’, but both of them are in a different virtual environment, so I should source the environment again.

so my puzzle is: Is there a mechanism that can enable the whole project keep running without switching the virtual environment.And because the “fate” is a relatively close part, I want to keep the virtual environment of ‘fate’ as far as possible(try to avoid put all the python packages in a single environment).

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/883603.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-14
下一篇2022-05-14

发表评论

登录后才能评论

评论列表(0条)

    保存