0

I have a very simple python jupyter notebook (map.ipynb), no ML/AI just a simple map hosted in my public github repo. You will see in it the requirements.txt file.

Following the voila deployment documentation, I am trying to deploy it on binder.

enter image description here

Unfortunately, I see then the following message:

enter image description here

Though it may seem similar to this other issue, in my case binder works correctly (as I can see the notebook) - only voila is failing. What am I missing?

enter image description here

G. Macia
  • 1,204
  • 3
  • 23
  • 38
  • My suspicion is your requirements.txt is wayyyy to specific and exhaustive. Even though it build, it's including something that is blocking MyBinder sessions from working right to allow the voila extension to connect. You have things like `terminado` , `tornado`, etc. in there that MyBinder needs to set itself. What you want to do is make a new directory named `binder` and put a different `requirements.txt` file in there. Then add just the essential 'extra' packages you need like folium, pandas, voila, etc. listed in that new `requirements.txt`. **ALL unpinned** for now. If that builds, ... – Wayne Nov 18 '22 at 17:04
  • see if the Voila icon shows up along the toolbar just above the notebook, like it does in a session launched [here](https://mybinder.org/v2/gh/fomightez/communication_voila/master?urlpath=%2Flab%2Ftree%2Fnotebooks%2FDonut%20plot%20on%20a%20widget%20tab.ipynb). (Voila Symbol well be next to the toggle for the cell type.) But don't press it yet, first you want to make sure you have the minimum packages needed by running the notebook with `Run All`. If you don't get module missing error, you are good and can try Voila. If you get something missing you add that to your ... – Wayne Nov 18 '22 at 17:09
  • list in `binder/requirements.txt` file and try again. If it runs, then you can try Voila. And if all that works, you can start pinning versions until it breaks. More than likely though it's just easier to keep the one in the `binder` directory unpinned unless you have to. That way you have the original `requirements.txt` with what you used in development and then when if it ever breaks with the newer packages you can know that you should be able to specify versions in `binder/requirements.txt` closer back towards that version to try and restore things to working order. – Wayne Nov 18 '22 at 17:12
  • I just helped someone do a similar thing with a more complex repo where they used conda/environment.yml. But the history will show you the progress. See result [here](https://github.com/Allen-BME/bear-classifier) and my fork starting with what they had with a variation of suggested changes [here](https://github.com/fomightez/bear-classifier). So it's different but the approach will be sort of similar and so it may help guide you. – Wayne Nov 18 '22 at 20:02
  • Thanks a lot @Wayne. Your suggestions help me realize that the requirements (which I simplified) where not being installed due to the runtime (pyhton3.9) which I have now also pass in runtime.txt. The notebook map.ipynb runs end-to-end in binder BUT the same error is still present in voila - any more suggestions? https://github.com/gloriamacia/ghana/blob/master/binder/requirements.txt – G. Macia Nov 20 '22 at 20:10
  • I don't know how you can claim the same error is present in Voila? Launches from your repo don't include Voila. It isn't listed in `binder/requirements.txt`. Works fine in my fork where I added Voila. – Wayne Nov 20 '22 at 22:51
  • My fork is at https://github.com/fomightez/ghana . And you can try going directly into Voila mode via [this link to launch](https://mybinder.org/v2/gh/fomightez/ghana/master?urlpath=voila%2Frender%2Fmap.ipynb). Only thing I changed was including Voila in the `binder/requirements.txt`. – Wayne Nov 20 '22 at 23:05

0 Answers0