Open djsegal opened 5 years ago
What version of WebIO are you using?
v0.2.8
// see the linked PR for one way to resolve this
@travigd does this make sense?
That PR conflicts with the current version of WebIO as it seems to be based on an old version. The current version is 0.7.0, and new work is generally being focused on the webio-retool
branch (which I believe will ultimately be v1.0.0).
@shashi can you take a look at the PR and tell me if it'll break anything?
// if not, ill get it working on master or webio-retool
Is this thread still open? The title sounds exactly as I would be creating.
The `WebIO is not detected
when running binder.
https://mybinder.org/v2/gh/mmikhasenko/2019-10-16_MIAPP/master?filepath=julia-demo%2Fpole_vs_log.ipynb
Julia-1.2
WebIO v0.8.11
; jupyter nbextension list
tells that everything is ok
Known nbextensions:
config dir: /home/jovyan/.jupyter/nbconfig
notebook section
webio-jupyter-notebook enabled
config dir: /srv/conda/envs/notebook/etc/jupyter/nbconfig
notebook section
jupyter-js-widgets/extension enabled
- Validating: OK
- Validating: OK
reinstallation as suggested in https://juliagizmos.github.io/WebIO.jl/latest/troubleshooting/not-detected/#WebIO-Not-Detected-1 does not help
This issue is that we don't install the nbextension automatically anymore, so you have to run WebIO.install_jupyter_nbextension()
and refresh the notebook page so that it is loaded. Based on your jupyter nbextension list
output, it should work if you simply refresh.
Perhaps we can modify the build to detect if it's running under Binder. Perhaps checking for the BINDER_PORT
environment variable? Then we could install the extension during the build process.
EDIT: Upon looking closer, I can see another issue. WebIO installs a server extension to run the asset server (AssetServer.jl). This requires the jupyter notebook process to be restarted to take effect which isn't possible in the binder environment. Perhaps the extra build check I described above might help (depending on when Binder installs and builds the Julia packages - before or after starting the notebook server).
What does it mean "to refresh"? I restarted the notebook several times, also after reinstalling, and couldn't make it work.
Did my binder notebook with @manipulate work fine for you?
Thank you for the quick response
By refresh I just mean Ctrl+R to refresh the page after running install_jupyter_nbextension.
No, interact doesn't work because of the asset server issue I described (it needs to load custom JS and CSS files and it does so using assetserver).
Ok, thanks for the clarification.
Do you think the required installation can be described in the environment.yml
file?
E.g. https://github.com/binder-examples/appmode/blob/master/environment.yml
Would it be a possible workaround to pin the older version of WebIO?
Just found a solution! - Adding a postBuild
file to the repository.
#!/bin/bash
julia -e 'using WebIO; WebIO.install_jupyter_nbextension();'
I'm super happy, my examples are working again.
Awesome! Would be neat if we could incorporate that into WebIO's build process so as not to require people to do it manually.
I am not sure that a special case for the binder is the right idea.
What is about checking if IJulia
is installed?
haskey(Pkg.installed(),"IJulia") && WebIO.install_jupyter_nbextension()
Nevertheless,
I checked ENV["BINDER_PORT"]
when running at the binder,
"tcp://10.15.253.247:80"
IJulia is a dependency of WebIO (largely as a result of the lack of "optional dependencies" in Julia), so that wouldn't work. Also, I think the BINDER_PORT
variable is set by the Kubernetes runtime and isn't set when the image is being built.
We could check for the NB_PYTHON_PREFIX
variable which is (supposed to be?) set by repo2docker (which prepares a repo for binder).
It looks for files at:
But the files are actually at: