Python Docker运行在成功生成后获取内部服务器错误

Python Docker运行在成功生成后获取内部服务器错误,python,docker,deployment,amazon-elastic-beanstalk,aws-code-deploy,Python,Docker,Deployment,Amazon Elastic Beanstalk,Aws Code Deploy,我正在尝试运行dash python应用程序。 构建是成功的(虽然它提到了一些错误),但最终: $docker build -t dash-example . .... Successfully installed Brotli click dash dash-core-components dash-html-components dash-renderer Flask Flask-Compress itsdangerous Jinja2 MarkupSafe plotly retrying

我正在尝试运行dash python应用程序。 构建是成功的(虽然它提到了一些错误),但最终:

$docker build -t dash-example .
....

Successfully installed Brotli click dash dash-core-components dash-html-components dash-renderer Flask Flask-Compress itsdangerous Jinja2 MarkupSafe plotly retrying six Werkzeug dataclasses
Cleaning up...
Removing intermediate container 05a081927450
 ---> 1f5baad0a47c
Successfully built 1f5baad0a47c
Successfully tagged dash-example:latest
但当我运行它时,它在以下情况下被卡住:

$docker run -it --rm -p 8080 dash-example

*** Starting uWSGI 2.0.8 (64bit) on [Wed Jun  2 19:04:48 2021] ***
compiled with version: 4.9.1 on 04 November 2014 00:03:50
os: Linux-5.8.0-53-generic #60~20.04.1-Ubuntu SMP Thu May 6 09:52:46 UTC 2021
nodename: 93acf9e34c2b
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /var/app
detected binary path: /var/app/bin/uwsgi
setgid() to 1000
setuid() to 1000
屏幕显示内部服务器错误。 我的档案是:

  • application.py

     import dash
    
     import dash_core_components as dcc
    
     import dash_html_components as html
    
     app = dash.Dash()
    
     application = app.server
     app.layout = html.Div(children=[
     html.H1(children='Hello Dash'),
    
     html.Div(children='''
         This is Dash running on Elastic Beanstalk.
     '''),
     dcc.Graph(
         id='example-graph',
         figure={
             'data': [
                 {'x': [1, 2, 3], 'y': [4, 1, 2], 'type': 'bar', 'name': 'SF'},
                 {'x': [1, 2, 3], 'y': [2, 4, 5], 'type': 'bar', 'name': u'Montréal'},
             ],
             'layout': {
                 'title': 'Dash Data Visualization'
             }
         }
     )])if __name__ == '__main__':
      application.run(debug=True, port=8080)
    
      # Beanstalk expects it to be running on 8080.
    
requirements.txt

Brotli==1.0.9
click==7.1.2
dash==0.21.1
dash-core-components==0.22.1
dash-html-components==0.10.1
dash-renderer==0.12.1
Flask==2.0.1
Flask-Compress==1.9.0
itsdangerous==2.0.1
Jinja2==3.0.1
MarkupSafe==2.0.1
plotly==4.14.3
retrying==1.3.3
six==1.16.0
Werkzeug==2.0.1
Dockerfile

FROM amazon/aws-eb-python:3.4.2-onbuild-3.5.1
有人能告诉我这里出了什么错吗