Jupyterhub不读配置文件

问题描述 投票:0回答:1

我已经在Ubuntu 16.04安装Jupyterhub与畅达安装。接下来,我把它用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 /应用/ Anaconda3 /

Jupyterhub配置文件目录:/etc/Applications/JupyterHub/jupyterhub_config.py

谁能帮我这个?

jupyterhub
1个回答
0
投票

下面的命令启动一个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

© www.soinside.com 2019 - 2024. All rights reserved.