Issues deploying Dash to Google App Engine python3 runtime


#1

I am trying to deploy a very basic Dash app to GAE using the Python 3 flexible runtime, but the deployment always fails with: “ERROR: (gcloud.app.deploy) Error Response: [13] An internal error occurred during deployment”. My app runs fine locally, I suspect that the problem has to do with GAE’s python3 runtime and Dash’s dependencies

My app.yaml file is as follows:

runtime: python
env: flex
entrypoint: gunicorn -b :$PORT main:app

runtime_config:
  python_version: 3

manual_scaling:
  instances: 1
resources:
  cpu: 1
  memory_gb: 0.5
  disk_size_gb: 10

My main.py file is as follows:

import dash
import dash_html_components as html
import dash_core_components as dcc
import plotly.graph_objs as go
from dash.dependencies import Input, Output, State, Event
from flask import Flask

# Initialize dash app
server = Flask(__name__)
app = dash.Dash(__name__, server = server)
app.config['suppress_callback_exceptions'] = True
app.css.config.serve_locally = True
app.scripts.config.serve_locally = True
s
app.layout = html.Div([
    dcc.Input(id='my-id', value='initial value', type='text'),
    html.Div(id='my-div'),
    dcc.Graph(id = 'go')
])

@app.callback(
    Output(component_id='my-div', component_property='children'),
    [Input(component_id='my-id', component_property='value')]
)
def update_output_div(input_value):
    return 'You\'ve entered "{}"'.format(input_value)


if __name__ == '__main__':

    app.run_server(debug = True)

My requirements.txt file is as follows:

dash==0.30.0
dash-core-components==0.38.1
dash-html-components==0.13.2
dash-renderer==0.15.1
Flask==1.0.2
Flask-Compress==1.4.0
gunicorn==19.9.0
plotly==3.4.2

This is about as basic a deployment possible (trying to see what is causing the deployment to fail). Are there known issues with Dash’s dependencies and the GAE python3 runtime? Should I just go with python2?

Thanks!