在带有烧瓶的LAMP(python)堆栈上部署keras(带有theano后端)?(Deploy keras (with theano backend) on a LAMP (python) stac

编程入门 行业动态 更新时间:2024-10-21 16:07:57
在带有烧瓶的LAMP(python)堆栈上部署keras(带有theano后端)?(Deploy keras (with theano backend) on a LAMP (python) stack with flask?)

我正在尝试在计算引擎上部署带有keras和theano的Flask Web应用程序。 当我import keras并运行sudo service apache2 restart时,服务器进入循环(“等待IP地址”)。 error.log给出以下错误

[:error] [pid 1588:tid 140666780755712] Using Theano backend.

我在ubuntu 14.04

I am trying to deploy a Flask web app with keras and theano on compute engine. When I import keras and run sudo service apache2 restart, the server goes into a loop ("waiting for IP address"). The error.log gives the following error

[:error] [pid 1588:tid 140666780755712] Using Theano backend.

I am on ubuntu 14.04

最满意答案

我让keras在计算引擎上工作。 要导入繁重的库,我们需要在.conf文件中设置某些参数。

将以下代码添加到/etc/apache2/sites-enables/yourapp.conf文件中:

WSGIDaemonProcess yourapp user=you group=somegroup processes=1 threads=5 <Directory /home/directory/to/webserver/html/appdir/app.wsgi> WSGIProcessGroup yourapp WSGIApplicationGroup %{GLOBAL} Order deny,allow Allow from all </Directory>

有关详细信息,请参阅此链接 - http://cmry.github.io/notes/bottle

I got keras working on compute engine. To import heavy libraries we need to set certain parameters in .conf file.

Add the following code to your /etc/apache2/sites-enables/yourapp.conf file:

WSGIDaemonProcess yourapp user=you group=somegroup processes=1 threads=5 <Directory /home/directory/to/webserver/html/appdir/app.wsgi> WSGIProcessGroup yourapp WSGIApplicationGroup %{GLOBAL} Order deny,allow Allow from all </Directory>

Refer this link for details - http://cmry.github.io/notes/bottle

更多推荐

本文发布于:2023-08-07 01:04:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1457886.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:烧瓶   堆栈   后端   python   LAMP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!