Python 在运行AWS深度学习基础AMI(Amazon Linux 2)时,如何在Elastic Beanstalk中设置WSGI?
在我的elasticbeanstalk中,我有:Python 在运行AWS深度学习基础AMI(Amazon Linux 2)时,如何在Elastic Beanstalk中设置WSGI?,python,linux,amazon-web-services,flask,amazon-elastic-beanstalk,Python,Linux,Amazon Web Services,Flask,Amazon Elastic Beanstalk,在我的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" IamInstanceP
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在哪里(AWS深度学习基地ami(AmazonLinux2))
我有一个烧瓶应用程序,带有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
我做错了什么?我做了更多的挖掘,我认为一种方法是创建您自己的自定义平台表单EB:
这并不完美,但也许可以进一步探索将深度学习AMI与EB结合使用的方法。您在日志中观察到任何错误吗?没有。但是我认为深度学习AMI不是为WSGI设置的。我认为你是对的。我该如何运行WSGI?确保我的应用程序被移动到最新版本?目前不知道。但是在常规的EB-ami上安装ML库不是更容易吗?我不确定AMIs有哪些深层次的学习,所以可能无法做到?如果是这样,那么我可以使用Amazon Linux 2,只需运行预构建即可安装CUDA驱动程序。我想这会有点困难。或者我可以使用一个Ubuntu实例并在上面安装CUDA。但我该如何设置WSGI?@Shamoon也许应该在当前的EB实例上安装CUDA?