问题标签 [jupyterhub]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
pyspark - PySpark 内核(JupyterHub)可以在纱线客户端模式下运行吗?
我当前的设置:
- 使用 HDFS 和 YARN 的 Spark EC2 集群
- JuputerHub(0.7.0)
- PySpark 内核与 python27
我用于这个问题的非常简单的代码:
在 Spark 独立版中按预期工作的 PySpark 内核在内核 json 文件中具有以下环境变量:
但是,当我尝试在 yarn-client 模式下运行时,它会永远卡住,而 JupyerHub 日志的日志输出是:
如此处所述,我添加了HADOOP_CONF_DIR 环境。变量指向 Hadoop 配置所在的目录,并将PYSPARK_SUBMIT_ARGS --master
属性更改为“ yarn-client ”。此外,我可以确认在此期间没有其他作业在运行,并且工人已正确注册。
我的印象是可以像其他人那样配置带有 PySpark 内核的 JupyterHub Notebook 以与 YARN 一起运行,如果确实是这种情况,我做错了什么?
jupyter-notebook - 如何导出整个 Jupyter 笔记本?
我不确定这个地方是否适合发布这个问题,但我想下载一个包含多个 Jupyter 笔记本的文件夹,以便我可以在本地服务器中查看?
谢谢!
linux - 如何构建测试环境(Linux、Spark、jupyterhub
我正在写我的论文,我有机会建立一个工作环境来测试功能以及它是如何工作的。
应包括以下几点:
- jupyterhub(在私有云中)
- 熊猫,numpy,sql,nbconvert,nbviewer
- 将数据放入DataFrame(csv),分析数据,存储数据(RDD?,HDF5?,HDFS?)
- 未来分析的火花
测试场景将包括:
- 具有用户/主题笔记本的多用户环境
- 分析具有几百万行的结构化表(RSEG、MSEG、EKPO),与 pandas、numpy 和 spark(spark-sql)、matplotlib 进行 3 路匹配。这 3 个表中的数据约为 3GB。
- 使用 nbconvert、nbviewer 将笔记本导出为 pdf、只读 notbook 和/或reveal.js
你们能否给我一些关于我应该使用多少笔记来测试的提示或经验,哪个 Linux 发行版是一个好的开始?我相信还有更多问题,我很难找到方法或信息来评估可能的答案。
提前致谢!
windows - 指定 JupyterHub 路径变量
我正在安装jupyterhub。我使用以下方法成功安装了 jupyterhub:
但是,当我jupyterhub -h
在 Windows 命令提示符下运行时,它会给出:
我添加C:\Users\User\AppData\Local\Continuum\Anaconda3\Lib\site-packages\jupyterhub\
到我的用户环境变量中,但仍然收到消息。我应该使用什么路径?
html - 在网页中嵌入 Jupyter HTML 输出
我想在我自己的网页中嵌入 Jupyter 的 HTML 输出。这样做的主要原因是,我可以从我自己的 web 应用程序中使用 Jupyter——还可以通过互联网从世界任何地方访问我的研究笔记本。
一个典型的用例场景是我点击页面上的一个按钮,一个 iframe 将插入到我的页面中;然后 Jupyter 将在后端启动(如果尚未运行),Jupyter 的输出将通过管道传输到 iframe - 这样我就可以在我的页面中使用 Jupyter。
它出现的幼稚解决方案是使用<iframe>
,但有两个问题:
- iframe 跨域策略问题
- Jupyter 首次启动时生成一次性身份验证令牌
无论如何我可以克服这些问题,所以我可以将 Jupyter 的输出嵌入到我自己的网页中吗?
jupyterhub - 如何使用 json Web 令牌 (JWT) 对 JupyterHub 用户进行身份验证?
我试图找出使用 JWT 验证 JupyterHub 用户的最佳方法。在我的特定用例中,客户端将首先在主网站上进行身份验证,并在稍后阶段重定向到 JupyterHub 代理(两个站点都托管在同一个域后面)。这个想法是完全绕过 JupyterHub 登录屏幕并允许用户访问他的笔记本(前提是 HTTP 请求的 Authorization 标头中提供了有效的 JWT 令牌)。一旦用户登录到主站点,就会生成 JWT 令牌。
任何关于如何实现这一点的指针/建议将不胜感激!我的猜测是我需要编写一个自定义身份验证器来验证 JWT。但是,我不确定如何配置整个过程。谢谢!
docker - 带有 dockerspawner 的 Jupyterhub 无法运行 - 错误 502
我正在尝试设置多用户 jupyter 设置。对于这种情况,我使用 RemoteCSVAuthenticator 和 DockerSpawner 设置了一个 jupyterhub。
身份验证似乎工作正常,并且如果我登录,则会启动一个 docker-container。但是登录后我只收到一个 502 错误消息:
jupyterhost 日志文件没有显示错误。dockercontainer 是普通的
jupyterhub/singleuser
.
谁能告诉我从哪里开始?
在尝试深入研究问题后,我发现如果我尝试访问 docker 容器内的 jupyter 进程(例如http://172.17.0.36:8888/),它总是会抛出错误 404 - 找不到页面。我不认为这是正常的。也许这就是可配置的http-proxy 抛出“Bad Gateway”错误的原因。
ssl - Jupyterhub 子域和多个 ssl 证书
我正在设置一个多用户 JupyterHub 服务器。我已经实现了 JupyterHub 文档中推荐的子域机制。用户在其 Web 浏览器中输入服务器的登录 URL,例如https://notebook.example.com,当他们登录时,JupyterHub 会为他们创建一个子域,例如https://username.notebook.example。 com。
我的通配符 DNS 工作得很好。问题是此设置似乎需要多个 SSL 证书。我的证书颁发机构非常友好地为我提供了 notebook.example.com 和通配符证书 *.notebook.example.com 的证书。如果我有 notebook.example.com 证书的此配置:
那么用户的浏览器将接受登录 URL 的证书,但是当用户被转发到用户的子域 URL 时会给出无法识别的证书消息。如果我使用其他证书,例如
那么用户的浏览器会抱怨“notebook.example.com”与证书中的 *.notebook.example.com 不匹配,但当用户被转发到他们的子域时会接受证书。
显然,我可以告诉用户在一种情况下同意证书例外,但这可能会产生长期支持问题(我必须指导他们如何接受所有不同浏览器的无法识别的证书;他们可能会进入盲目接受证书的习惯)。
有没有一种方法可以将 JupyterHub 配置为使用一个证书进行初始登录,而另一个证书用于子域?
docker - 在 nvidia-docker 中限制 GPU 的使用?
我正在多 GPU 服务器上设置内部 Jupyterhub。Jupyter 访问是通过 docker 实例提供的。我想将每个用户的访问权限限制为不超过一个 GPU。我很感激任何建议或评论。谢谢。
ubuntu - Ubuntu Jupyterhub: 500 POST Spawner failed to start [status=1]
I am trying to run jupyterhub for multiuser mode:
I am able to login successfully with the user I used to install jupyterhub. However, when I try to login with other users I get the following message:
500: Internal Server Error Spawner failed to start [status=1]
And in the terminal:
user@server:~$ sudo jupyterhub
[I 2017-02-18 11:47:53.663 JupyterHub app:733] Loading cookie_secret from /home/user/jupyterhub_cookie_secret
[W 2017-02-18 11:47:53.691 JupyterHub app:372] Generating CONFIGPROXY_AUTH_TOKEN. Restarting the Hub will require restarting the proxy. Set CONFIGPROXY_AUTH_TOKEN env or JupyterHub.proxy_auth_token config to avoid this message.
[W 2017-02-18 11:47:53.695 JupyterHub app:874] No admin users, admin interface will be unavailable.
[W 2017-02-18 11:47:53.695 JupyterHub app:875] Add any administrative users to
c.Authenticator.admin_users
in config.[I 2017-02-18 11:47:53.695 JupyterHub app:902] Not using whitelist. Any authenticated user will be allowed.
[I 2017-02-18 11:47:53.714 JupyterHub app:1481] Hub API listening on http://127.0.0.1:8081/hub/
[W 2017-02-18 11:47:53.716 JupyterHub app:1201] Running JupyterHub without SSL. I hope there is SSL termination happening somewhere else...
[I 2017-02-18 11:47:53.716 JupyterHub app:1203] Starting proxy @ http://*:8000/
11:47:54.569 - info: [ConfigProxy] Proxying http://*:8000 to http://127.0.0.1:8081
11:47:54.574 - info: [ConfigProxy] Proxy API at http://127.0.0.1:8001/api/routes
[I 2017-02-18 11:47:54.597 JupyterHub app:1537] JupyterHub is now running at http://127.0.0.1:8000/
Last login: Sat Feb 18 00:26:34 CET 2017
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-62-generic x86_64)
Documentation: https://help.ubuntu.com
Management: https://landscape.canonical.com
Support: https://ubuntu.com/advantage
1 package can be updated.
0 updates are security updates.
[I 2017-02-18 11:48:10.990 JupyterHub spawner:785] Spawning jupyterhub-singleuser '--user="username"' '--cookie-name="jupyter-hub-token-username"' '--base-url="/user/username"' '--hub-host=""' '--hub-prefix="/hub/"' '--hub-api-url="http://127.0.0.1:8081/hub/api"' '--ip="127.0.0.1"' --port=52764
Traceback (most recent call last):
File "/usr/local/bin/jupyterhub-singleuser", line 4, in import('pkg_resources').require('jupyterhub==0.8.0.dev0') File
"/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 3036, in @_call_aside
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 3020, in _call_aside f(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 3049, in _initialize_master_working_set working_set = WorkingSet._build_master()
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 654, in _build_master ws.require(requires)
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 968, in require needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 854, in resolve raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'jupyterhub==0.8.0.dev0' distribution was not found and is required by the application
[W 2017-02-18 11:48:21.038 JupyterHub web:1545] 500 POST /hub/login?next= (::ffff:10.90.0.4): Spawner failed to start [status=1]
[E 2017-02-18 11:48:21.066 JupyterHub log:99] {
"Content-Length": "36",
"Content-Type": "application/x-www-form-urlencoded",
"Accept-Encoding": "gzip, deflate",
"Accept-Language": "en-US",
"Dnt": "1",
"Host": "zeno.lehre.hwr-berlin.de:8000",
"Cookie": "_xsrf=2|1204c4dd|f391c8200e87548242350a9d25406790|1487111102",
"X-Forwarded-Host": "server.com:8000",
"Connection": "close",
"X-Forwarded-For": "::ffff:...",
"X-Forwarded-Proto": "http",
"Accept": "text/html, application/xhtml+xml, /",
"Cache-Control": "no-cache",
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko",
"Referer": "http://server.com:8000/hub/login",
"X-Forwarded-Port": "8000"
}
[E 2017-02-18 11:48:21.066 JupyterHub log:100] 500 POST /hub/login?next= (@::ffff:...) 10283.44ms
I don't know if that would be the source of the problem, however, I have jupyterhub version: 0.7.0. I tried to update it to 0.8.0 using:
But, I got:
Requirement already up-to-date: ****
I tried so long to find a solution online; I failed though.
Would someone please help me with this issue?
Thanks :)