Join us on Wednesday, June 3rd for a deep dive into Customer Predictive Analytics Learn more

Trouble Setting Code Env for Plugin Webapp

Level 3
Trouble Setting Code Env for Plugin Webapp

I have an existing plugin, and I recently added a bokeh webapp component. However, I need the newest version of bokeh. I've tried to find help here, but keep failing to load the webapp with the newest version.  I've reloaded the plugin and regenerated the webapp to no avail.  My files are as follows:

Requirements.txt and Environment.spec both look the same

bokeh==2.0.2

 Requirements.json 

{    "python" : [
        {"name":"pandas", "version":">=0.16.2"},
        {"name":"sqlalchemy", "version":">=0.1"},
        {"name":"bokeh", "version":"==2.0.2"}       ]}

Webapp.json

    "baseType": "BOKEH", // WARNING: do not change
    "hasBackend": "true",
    "standardWebAppLibraries": null,

 

4 Replies
Dataiker
Dataiker

Hi,

I would not recommend adding/modifying requirements.json as this is linked to the built-in DSS python environment. Environment.spec is not necessary if you don't use conda.

Ideally, you only need to specify your required packages in the "requirements.txt" file. The desc.json is used to specify the python version and if you need base packages (including pandas).

You can use this GitHub repo as an example: https://github.com/dataiku/dss-plugin-timeseries-preparation/tree/master/code-env/python

Hope it helps,

Alex

Dataiker
Dataiker

Hi,

As a side note to Alex's answer, I want to stress that we have not yet validated whether DSS webapps work with Bokeh 2. Our previous experience with Bokeh shows that there tends to be significant variations between versions that may require specific supporting code in DSS.

Dataiker
Dataiker

About the error(s?): bokeh 2.0.2 is not available to python2.7 environments (that's a decision of the bokeh devs), so you'd need to force the list of possible python versions in the code env of the plugin, by filling the acceptedPythonInterpreters field, like:

{
  "acceptedPythonInterpreters": ["PYTHON36"],
  "forceConda": false,
  "installCorePackages": true,
  "installJupyterSupport": false
}

 

Level 3
Author

Still can't seem to serve with bokeh 2

2020-05-07 14:34:09,986 Starting Bokeh server version 0.12.16 (running on Tornado 5.1.1)

It works in my webapp editor which is running in a custom Bokeh2 code environment. 

Can I load this webapp plugin with this custom code environment somehow?