Hello, I am trying to add jupyterhub-idle-culler
to a jupyterhub (installed with pip3 install jupyterhub
):
pip3 install jupyterhub-idle-culler
nano /etc/jupyterhub/jupyterhub_config.py
[...]
c.JupyterHub.load_roles = [
{
"name": "jupyterhub-idle-culler-role",
"scopes": [
"list:users",
"read:users:activity",
"read:servers",
"delete:servers",
# "admin:users", # if using --cull-users
],
# assignment of role's permissions to:
"services": ["jupyterhub-idle-culler-service"],
}
]
[...]
c.JupyterHub.services = [
{
"name": "jupyterhub-idle-culler-service",
"command": [
sys.executable,
"-m", "jupyterhub_idle_culler",
"--timeout=604800",
],
# "admin": True,
}
]
[...]
But when I try to start Jupyterhub I have the error:
jupyterhub -f /etc/jupyterhub/jupyterhub_config.py
NameError: name 'sys' is not defined