首页 > 解决方案 > 在烧瓶应用程序部署到 apache2 中使用 tensorflow 时出错

问题描述

在这里,我想在应用程序部署在 apache2 服务器中的烧瓶应用程序中使用 tensorflow

import tensorflow as tf

从日志 apache2 得到这样的错误

[Tue Jun 05 14:29:00.093731 2018] [mpm_event:notice] [pid 7112:tid 140335736346496] AH00491: caught SIGTERM, shutting down
[Tue Jun 05 14:29:01.225840 2018] [wsgi:warn] [pid 7234:tid 140317437794176] mod_wsgi: Compiled for Python/2.7.11.
[Tue Jun 05 14:29:01.225914 2018] [wsgi:warn] [pid 7234:tid 140317437794176] mod_wsgi: Runtime using Python/2.7.12.
[Tue Jun 05 14:29:01.227181 2018] [mpm_event:notice] [pid 7234:tid 140317437794176] AH00489: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g mod_wsgi/4.3.0 Python/2.7.12 configured -- resuming normal operations
[Tue Jun 05 14:29:01.227202 2018] [core:notice] [pid 7234:tid 140317437794176] AH00094: Command line: '/usr/sbin/apache2'
Dlib was compiled to use SSE41 instructions, but these aren't available on your machine.
[Tue Jun 05 14:29:05.338628 2018] [wsgi:error] [pid 7239:tid 140317252646656] [client 192.168.96.9:51066] Truncated or oversized response headers received from daemon process 'class': /var/www/html/classifier/class.wsgi
[Tue Jun 05 14:29:06.232545 2018] [core:notice] [pid 7234:tid 140317437794176] AH00051: child pid 7238 exit signal Illegal instruction (4), possible coredump in /etc/apache2

类.wsgi:

import sys

sys.path.insert(0, "/var/www/html/classifier/")

from index import app as application

问题的任何线索?

标签: pythonapachetensorflowmod-wsgi

解决方案


尝试添加到 Apache 配置:

WSGIApplicationGroup %{GLOBAL}

看:


推荐阅读