New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with deploy dash > 1.1 on Shinyproxy 2.3.1 #235
Comments
UPDATE: Dash 1.17.0 and ShinyProxy 2.4.1 seem to have done the trick.
|
I can't reproduce this fix with Dash 1.17.0 and ShinyProxy 2.4.1. The Dash Demo works fine with older version of Dash, but it's not clear to me how the above solution should be implemented for the Dash Demo: https://github.com/openanalytics/shinyproxy-dash-demo Can you provide some more details?
|
Hi @jtpoirier When creating a Dash application, you can specify some parameters. In order to make Dash work properly with ShinyProxy you''ll have to specify two parameters, with the same value. These parameters are:
The value of these parameters should be as follows:
You have to replace
Then the id of the application is
So at the top of your dash application, you'll probably have the following python code:
I hope this is clear and helps. Good luck! |
Hi @jfrubioz We made a change that will be included in the next ShinyProxy release to make working with Dash apps easier. From that release on, every ShinyProxy app will have an environment variable |
Thanks for the fast responses. It sounds like your planned improvement will help. The above code does not seem to successfully launch dash-demo with the latest version of Dash, potentially for a few reasons. "server" is not defined in the dash-demo app.py, so it won't run. If that line is removed, the app will start in the command line as below, but the container will never respond in time via the web interface. To be clear, the dash-demo works fine in this environment w/ dash ≤ 1.1.
|
Yes, I realized that I did not include any reference to the server. I updated the update to include the As @LEDfan explained, the solution relies simply on adding '/app_direct/dash-demo/' to your 'requests_pathname_prefix'. But I do not think you need to enter it into 'routes_pathname_prefix' as well. Hence, I would just make sure your python code looks like this:
|
Starting with the latest dash-demo release, I replaced the line 'app=dash.Dash()' with the below code as suggested. Again the server will run in command line but times out when launched from shinyproxy. I confirm that the id of the app is 'dash-demo' in my application.yml file.
|
I see now that this solution is exclusive to >1.1 and not a general solution for all version of dash. I've now reproduced this fix with dash-demo and a second more complex application. Thanks so much for your assistance. |
Hi @jtpoirier , great that you managed to solve the issue! @jfrubioz we released ShinyProxy 2.5.0 in which each container now has the Since this is fixed now, I'm closing this issue. As always, feel free to open a new issue if you encounter any problem. |
Hi community,
I am trying to deploy a dash (latest build) app with Shinyproxy. It seems that the last successful dash/dash dependencies built than can work with Shinyproxy is:
dash 1.1.1
dash-bootstrap-components 0.7.1
dash-core-components 1.1.1
dash-html-components 1.0.0
dash-renderer 1.0.0
dash-table 4.1.0
I have tried a couple of fixes to launch it without luck, neither of which works with Dash > 1.1.0. I am adding the known solutions I’ve tried so far:
Method 1:
app = dash.Dash(__name__, requests_pathname_prefix='/app_direct/dash-demo/')
Method 2:
I did try to include
__name__
and/or excludeexternal_stylesheets
I also tried without success to move the request inside the
config.update
:For reference, these solutions always result in none of this components loading:
polyfill@7.v1_6_0m1598451932.8.7.min.js
react@16.v1_6_0m1598451932.13.0.min.js
react-dom@16.v1_6_0m1598451932.13.0.min.js
prop-types@15.v1_6_0m1598451932.7.2.min.js
dash_bootstrap_components.v0_10_3m1598451933.min.js
bundle.v4_9_0m1598451932.js
dash_html_components.v1_0_3m1598451932.min.js
dash_core_components.v1_10_2m1598451932.min.js
dash_core_components-shared.v1_10_2m1598451932.js
dash_renderer.v1_6_0m1598451932.min.js
react-dom@16.v1_6_0m1598451932.13.0.min.js
prop-types@15.v1_6_0m1598451932.7.2.min.js
dash_bootstrap_components.v0_10_3m1598451933.min.js
bundle.v4_9_0m1598451932.js
dash_html_components.v1_0_3m1598451932.min.js
dash_core_components.v1_10_2m1598451932.min.js
dash_core_components-shared.v1_10_2m1598451932.js
dash_renderer.v1_6_0m1598451932.min.js
I would appreciate any help with this issue.
The text was updated successfully, but these errors were encountered: