aimacode / aima-python

Python implementation of algorithms from Russell And Norvig's "Artificial Intelligence - A Modern Approach"
MIT License
7.81k stars 3.65k forks source link

mybinder.org for IPython notebooks? #428

Open norvig opened 7 years ago

norvig commented 7 years ago

We should look at http://mybinder.org/ and see if it is appropriate for running the Ipython/Jupyter notebooks.

antmarakis commented 7 years ago

I don't know if it's just me, but when I try to open any Binder project, I get stuck on a loading loop (even for small projects).

lucasmoura commented 7 years ago

Same problem here. At first I thought that maybe there were some problems on our notebooks to be displayed in the site. But the build proces in mybinder seems to be okay.

antmarakis commented 7 years ago

I researched this a bit and it seems that Binder is not very stable. A lot of issues on their GitHub are about launch failing, while parts of their website are currently down.

Also, there doesn't seem to be much support for the platform any more. Most of their repositories haven't been updated for over a year. (binder-build, last commit over a year ago - repo with most recent commit)

norvig commented 7 years ago

OK, thanks for the feedback. We will wait until there is a more stable option available.

reachtarunhere commented 7 years ago

@norvig I think it is possible to replicate their setup on a separate cloud provider. I will give it a shot with Google App Engine and get back. I feel that a dedicated server for AIMA will keep things more stable and result in better uptime. Though I still have doubts about how much we can support with the free tier service.

sofmonk commented 7 years ago

Apart from what @reachtarunhere mentioned, we could use thebe, thebe and jupyter. thebe is a plugin to jupyter notebooks to provide interactive coding. We can possibly build more over it.

sharecell and gist exec (gist exec example) are other prototypes on which we can build more to support the needs of our project.

We may use nbviewer to present static notebook collection of all the chapters which may be tied to the AIMA website. Apart from those mybinder seems the option for dynamic notebooks.

@norvig Sir, if you aim running code in real time (for classroom lectures, etc) Hydrogen is a good tool.

@MrDupin isn't this the binder-project, the updates have been no more than 2 months old?

antmarakis commented 7 years ago

@sofmonk, yes that is the binder-project. But the recent changes made to core components are not only few and far apart, but also miscellaneous (for example, line fixes, or updating version numbers). Unless it is supported elsewhere, the developers seem to have moved on.

sofmonk commented 7 years ago

mybinder is working now, maybe we should check it?

antmarakis commented 7 years ago

It worked for me too, but it took a long time to load (~ 2 minutes). After it got started though it worked smoothly. It seems though that the launcher is inconsistent (one time working then failing), so I'm still not 100% convinced.

darius commented 7 years ago

I just tried to launch it a couple times from the launch button on our README, and it failed both times with an unhelpful message like 'failed'. (I have poor connectivity here, though.)

reachtarunhere commented 7 years ago

@darius it often fails when you have bad connectivity given a constant link has to be established with the server for the interactivity. But even on good connections Binder fails a lot of times. This mostly has to do with the excess load on their servers (its non-commercial and free).

One solution is hosting our own instance of JupyterHub on Google App Engine/Digital Ocean etc. I haven't still worked out how to integrate it with GitHub auth (The other option is creating accounts manually which isn't useful in our case). Unfortunately I am finding it hard to make time to look into this. It would be great if someone can lend a hand at this.

darius commented 7 years ago

I'm going to see if I can run Jupyter locally first. I'm sort of busy, too...

norvig commented 5 years ago

I can't get the right requirements.txt for mybinder.

It is complaining that there is no compatible version of PIL.

Anyone able to help?

ad71 commented 5 years ago

@norvig Try adding pillow and Image to requirements.txt

norvig commented 5 years ago

That worked! Thanks, awesome!

stessaris commented 5 years ago

Image from requirements.txt installs https://pypi.org/project/image/ and django (see part of the logs below). Is that really expected? I cannot find any reference to django in the code. Moreover that package is not available in conda, so it needs to be installed via pip in a conda environment.

Collecting Image (from -r requirements.txt (line 6))
  Downloading https://files.pythonhosted.org/packages/0c/ec/51969468a8b87f631cc0e60a6bf1e5f6eec8ef3fd2ee45dc760d5a93b82a/image-1.5.27-py2.py3-none-any.whl
Collecting django (from Image->-r requirements.txt (line 6))
    Downloading https://files.pythonhosted.org/packages/32/ab/22530cc1b2114e6067eece94a333d6c749fa1c56a009f0721e51c181ea53/Django-2.1.2-py3-none-any.whl (7.3MB)