jupyter / dashboards

[RETIRED] See Voilà as a supported replacement
https://github.com/voila-dashboards
Other
984 stars 211 forks source link

Dashboard layout is not changed when deploying to local or jupyter dashboard server #280

Closed codingneo closed 7 years ago

codingneo commented 7 years ago

The layout change function is working in the jupyter notebook. However, after deploying as local dashboard or jupyter dashboard server, the layout changes to default one.

parente commented 7 years ago

Hi @codingneo. Are you saying that all cells in your notebook appear and whatever layout you've put them in is not retained when you deploy your notebook? If so, can you provide more information about what version of the notebook server you are running and steps to reproduce? If you can provide a sample notebook that evidences the problem, that would really help as well.

codingneo commented 7 years ago

@parente, I ! basically tried to set up the whole end-to-end workflow of Jupiter dashboard solution on my macbook (Sierra). I am facing a few issues and looking for the infirmation to see how to resolve it. I try to use pip3 to install all related packages (all jupyter related packages, dashboards, dashboards-bundler and dashboards-server. I use the hello_world notebook used in dashboard setup repo as an example. Dashboard layout extension works fine in my notebook. When deploy as local dashboard, I always see the default layout. But the other two components are not. For dashboard bundler, it download .ipnb instead of zip when download as dashboard server bundler (I am not sure whether this is the issue). My Jupiter dashboard server version is 0.8.0 (installed through npm). When I deploy notebook to dashboard server, it always fail. There is an indicator showing in the right upper corner saying "there is an error occurred, please check console for more detail". It cannot show seaborn figure as well as interactive widget. If I deploy as local dashboard, it can show seaborn figure if I remove interactive widget but if I add widget, it cannot show both. In the terminal, I see a lot of 404 errors and saying that widget JavaScript is not detected.

I guess it is the environment issue because on the same macbook, I also tried setup the whole system using dashboard _setup repo via docker. I am facing the same issues mentioned above.

@parente, if you can provide some suggestion to setup the whole system (dashboards, dadhboards-bundler, dadhboards-server) and make it work, it will be very helpful. Thank you

parente commented 7 years ago

Sorry for the late response.

When deploy as local dashboard, I always see the default layout.

The deploy as local dashboard option is deprecated in the dashboards_bundlers README. It will stop working in some near-future version of ipywidgets and notebook. (And perhaps it already has.)

There is an indicator showing in the right upper corner saying "there is an error occurred, please check console for more detail".

This most likely means that you do not have a kernel gateway server running or your dashboard server is not configured properly to use it.

https://github.com/jupyter-incubator/dashboards_setup/tree/master/docker_deploy is the way I recommend getting all of the components working together correctly. I followed the instructions in that repo and got a working setup on a new machine a couple weeks ago.

If you follow the docker setup instructions and try deploying a notebook as a dashboard to the dashboard server, please report back with what problems you encounter in that particular scenario and I'll try to help.

codingneo commented 7 years ago

@parente, thanks for the information. I now change to deploy both notebook seever, dashboard server and kernel gateway by using the docker-deploy. After I change some of the components to a specific version (Jupiter cms, declarative widget etc), it works. Now I am facing a new issue. Some of my dashboards have the associated data. I have used the association function provided by dashboard bundler to associate the data with the dashboard. I verify this by checking whether my data folder I'd in the bundler zip. It is there. However, when I deploy it to Jupiter dashboard server, the data is found on the dashboard server (/srv/app) but not in the kernel gateway where the dashboard is actually rendered (/home/Jordan/work)

parente commented 7 years ago

The association feature is for frontend web assets (HTML, CSS, JS). There is no automated way to distribute data from your notebook server to the kernel gateway. Either the data has to reside in a location accessible by both components (e.g., a database, a shared filesystem) or you have to duplicate the data from one to the other.

codingneo commented 7 years ago

How do I manually duplicate data from notebook server to kernel gateway?

parente commented 7 years ago

Since you're running the docker setup, you could add COPY directives to the dockerfiles for both the notebook server and kernel gateway to build the data right into the docker image if it's immutable. If you want to copy it in at runtime, have a look at docker cp or docker exec.

parente commented 7 years ago

@codingneo I'm going to close this issue as there haven't been any updates in over a month. For better or worse, I think it captures the conversation about making data accessible both to a notebook server and dashboard server.