【发布时间】:2020-10-31 15:57:17
【问题描述】:
在我的 elasticbeanstalk 中,我有:
Platform:
PlatformArn: arn:aws:elasticbeanstalk:us-east-2::platform/Python 3.7 running on 64bit Amazon Linux 2/3.0.3
OptionSettings:
aws:autoscaling:launchconfiguration:
RootVolumeSize: "90"
IamInstanceProfile: aws-elasticbeanstalk-ec2-role
ImageId: ami-017ff046baf80c98c
...
该 ami 是 https://aws.amazon.com/marketplace/pp/B07NMRZ463(AWS 深度学习基础 AMI (Amazon Linux 2))。
我有一个带有 application.py 的烧瓶应用程序:
....
# run the app.
if __name__ == "__main__":
# Setting debug to True enables debug output. This line should be
# removed before deploying a production app.
# application.debug = True
print('Starting application')
application.run(host='0.0.0.0')
当我加载它时,我的.platform/hooks/prebuild 运行(我在/var/log/eb-hooks.log 中看到日志)。但是我的应用服务器似乎没有启动。
如果重要的话,我的代码在 /var/app/staging 中,并且没有移到 /var/app/current。
我做错了什么?
【问题讨论】:
-
您在日志中发现任何错误吗?
-
不。但我认为深度学习 AMI 不是为 WSGI 设置的
-
我认为你是对的。
-
如何运行 WSGI?并确保我的应用程序被移动到当前?
-
暂时不知道。但是在常规 EB AMI 上安装 ML 库不是更容易吗?我不确定深度学习 AMI 有什么,所以可能无法完成?
标签: python linux amazon-web-services flask amazon-elastic-beanstalk