Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live reload of gateway on file change #350

Closed
itproto opened this issue Mar 26, 2021 · 2 comments
Closed

Live reload of gateway on file change #350

itproto opened this issue Mar 26, 2021 · 2 comments

Comments

@itproto
Copy link

itproto commented Mar 26, 2021

Is it some way to update kernel gateway REST service after updating target .ipynb

I am running docker container with the following entrypoint ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]

start-notebook.sh --NotebookApp.port=9999 --NotebookApp.notebook_dir=/srv/notebooks/ &
jupyter kernelgateway --KernelGatewayApp.port=7777 --KernelGatewayApp.api=notebook-http --KernelGatewayApp.ip=0.0.0.0 --KernelGatewayApp.seed_uri=/srv/notebooks/hello.ipynb
e

I want to run both processes at the same time. I can access and edit the target hello.ipynb , but rest API never reflects changes (until container restart).

Is it possible to "live-reload" gateway on file change?

@kevin-bates kevin-bates transferred this issue from jupyter/kernel_gateway_demos Mar 26, 2021
@kevin-bates
Copy link
Member

This capability doesn't exist today. I added dynamic configuration support to Enterprise Gateway at an experimental level that could probably be leveraged here. It would require that seed_uri be configured via a configuration file (which would need to be mounted into the container) and you'd probably need to add an observe trait to force JKG to re-populate its use of the notebook.

I'm not very familiar with the http-personality and don't know if this kind of "reset" is possible w/o restarting the server though - so you'd need to experiment with it.

Just some thoughts.

@itproto
Copy link
Author

itproto commented Mar 29, 2021

Kevin, thank you for your thoughts. That is very insightful. I was just playing around with idea of live preview of notebook as rest/web-socket API. I am going to experiment with a best restart technique.

@itproto itproto closed this as completed Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants