binder-project / binder

reproducible executable environments
http://mybinder.readthedocs.io
443 stars 38 forks source link

Adding file to /home/main/notebooks after git clone. #60

Open kingjr opened 8 years ago

kingjr commented 8 years ago

Hi all,

First thanks again for your service!

I discussed this issue with @andrewosh on gitter, but I thought it may actually help some other people.

I was trying to dynamically create ipynb notebooks during the docker installation, because all our examples are in *.py and not *.ipynb. I can do this easily, but since binder populates /home/main/notebooks there's no way for the user to interact with these newly created files using jupyter.

As a workaround, I modified the /home/main/start-notebook.sh directly: e.g.

RUN sed '$imkdir $HOME/notebooks/_notebooks' $HOME/start-notebook.sh --in-place

This is a bit hacky, but it works. I'm not sure whether you want to allow people to pass instructions after the repo cloning; it's probably not that used.

[PS: sorry for the high number of builds, I tried a bunch of things before that... :/]