Closed kmdalton closed 2 years ago
Going through the examples, I have tabulated the dependencies we actually import:
from IPython.disaply import HTML, Image
)Maybe we can make some sort of .yml
file with these specific dependencies and test out the launch time? I'm looking at you, @ianhi.
yeah -- I can split the [dev] dependencies between documentation / examples so that we only install the necessary ones in this context.
However, I think the main issue here is cacheing -- binder is very slow when something hasn't been set up in a while, but quite fast if it has been. I'm guessing because you just accessed it, it just loaded in ~5 seconds for me.
Yes, it is definitely zippy after the first run, but i think we should be able to pare down the initial build to <60s.
(based on other repos I've sampled).
Anyway --- this is outside my wheelhouse, but I figured it merited an issue.
Here's a webpage with some suggestions: https://discourse.jupyter.org/t/how-to-reduce-mybinder-org-repository-startup-time/4956
I can certainly take care of making another extras_require
entry in the setup.py
for handling only additional packages needed for the examples. That may speed things up a bit, but @ianhi may have some other ideas -- he set up binder in the first place.
I've made the simple changes that make sense. It's still not a "fast" build for the docker image, but I do think it's faster than it was. Feel free to close the issue if this seems to have improved things enough.
It's much faster now. Thanks!
This can be improved further by installing all the dependencies using mamba and then only using postBuild to install reciprocalspaceship
basically need an environment.yml file in the .binder
or binder
folder like here: https://github.com/jupyterlab-contrib/jupyterlab-vim/tree/master/binder
then binder will use mamba by default i think.
This is way outside of my wheelhouse, but I clicked on our binder link for the first time, and it takes a crazy amount of time (8-10 minutes!) to launch. On our end, I think all we're asking for Binder to do is run
pip install reciprocalspaceship[dev]
. This command installs a lot of stuff. Notably, it installs PyTorch for the robust merging example. I suspect this is what takes so long, but it could certainly be other packages.I would suggest it is worth some time to pair down the dependencies. In the case of PyTorch, we could defer the install to the first cell of the example notebook.
I'd love some help from @ianhi on this one. He certainly knows this stuff better than I.
Here is a partial log from a binder launch which may be helpful: