Python
Ubuntu
Azure
Dash

AzureのUbuntu Server 18.04 LTSでDash

実装

Dash Tutorial - Part 1: App Layoutここを参照にシンプルなAppを実装

$ vim helloDash.py
import dash
import dash_html_components as html

app = dash.Dash()

app.layout = html.Div(children=[
    html.H1(children='Hello Dash!')
])

if __name__ == '__main__':
    app.run_server(debug=True, host='0.0.0.0')

実行

$ python helloDash.py
 * Serving Flask app "test" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Running on http://0.0.0.0:8050/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 266-061-019

接続

Azure PortalのVMの受信ポートの規則で8050ポートを開放後、ブラウザでhttp://IPアドレス:8050で接続

image.png