I successfully configured jupyterhub on google cloud using very basic DummyAuthenticator and Docker Spawner following this tutorial: https://github.com/jupyterhub/jupyterhub-deploy-docker Everything is ok, but when the user logouts its docker container is still running. I was expecting that the container will be stopped when it is unused. It is a waste of resources for my taste. Is there any chance to trigger that behavior?
Asked
Active
Viewed 1,613 times
2 Answers
3
I used this from the default configuration file jupyterhub generated.
Shuts down all user servers on logout
c.JupyterHub.shutdown_on_logout = True
Culling should be used to shutdown inactive servers while the user is still logged in.

Nandor Poka
- 281
- 1
- 10
2
I don't think JupyterHub automatically deletes any services just by logging out.
But you can use Cull-Idle. It provides a script to cull and shut down idle single-user notebook servers. And its pretty easy to use.
Link :
https://github.com/jupyterhub/jupyterhub/tree/master/examples/cull-idle

saurssaurav
- 715
- 5
- 16
-
JupyterHub has an option to do this, no need for cull-service. See my answer. – Nandor Poka Apr 12 '20 at 19:26
-
I think `c.JupyterHub.shutdown_on_logout` is added from v1.0.0 of jupyterhub. Anyway thanks for the update. – saurssaurav Apr 14 '20 at 05:55