Jupyterhub не читает файл конфигурации

Я установил Jupyterhub на Ubuntu 16.04 с установкой conda. Затем я заставил его использовать oAuthenticator, добавив следующее в jupyterhub_config.py.

from oauthenticator.github import GitHubOAuthenticator
c.JupyterHub.authenticator_class = GitHubOAuthenticator
c.GitHubOAuthenticator.create_system_users = True

Я также добавил следующее в ~/.bashrc и получил его

#For OAuthentication
export GITHUB_CLIENT_ID=id
export GITHUB_CLIENT_SECRET=secret
export OAUTH_CALLBACK_URL=http://xyz:8000/hub/oauth_callback
export GIT_REPO_NAME=mmf
export GIT_BRANCH_NAME=master
export GITHUB_ACCESS_TOKEN= mytoken

После запуска jupyterhub я смог получить страницу «Войти с помощью git». Теперь я настроил jupyterhub для работы в качестве службы, создав /etc/systemd/system/jupyterhub.service и добавив к нему следующее:

[Unit]
Description=Starts JupyterHub as Daemon
After=syslog.target network.target

[Service]
User=root
Environment=”PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/etc/Applications/Anaconda3/bin”
ExecStart=/etc/Applications/Anaconda3/bin/jupyterhub –f /etc/Applications/JupyterHub/jupyterhub_config.py

[Install]
WantedBy=multi-user.target

Теперь я запустил его с помощью systemctl start jupyterhub, но теперь я получаю обычную страницу входа в систему, а не git.

Вероятно, это потому, что он не читает файл jupyterhub_config.py. Я проверил все каталоги, упомянутые в jupyterhub.service, и все они проверены.

Каталог установки Anaconda: /etc/Applications/Anaconda3/

Каталог файла конфигурации Jupyterhub: /etc/Applications/JupyterHub/jupyterhub_config.py

Кто-нибудь может мне с этим помочь?


person Amber    schedule 06.02.2019    source источник


Ответы (1)


Запустите Jupyterhub с помощью следующей команды:

jupyterhub -f /etc/Applications/JupyterHub/jupyterhub_config.py

В вашем случае, я думаю, это должно быть

systemctl start jupyterhub -f /etc/Applications/JupyterHub/jupyterhub_config.py

Для справки по документам

https://jupyterhub.readthedocs.io/en/stable/getting-started/config-basics.html#start-with-a-specific-config-file

person saurssaurav    schedule 06.02.2019