问题标签 [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.

0 投票
2 回答
990 浏览

jupyter-notebook - JupyterHub 上的多用户登录

我正在尝试使用这些说明在 Amazon EC2 实例上设置 JupyterHub 。

在标题为“运行 Hub 服务器”的步骤中,我正在使用sudo jupyterhub. 但我无法使用其他 Linux 用户的凭据(除了用于运行服务器的用户)登录。

它在日志中显示没有这样的文件或目录:'jupyterhub-singleuser',我在浏览器中收到 500 内部服务器错误。请帮忙!

0 投票
1 回答
225 浏览

python-2.7 - 使用 jupyter 堆栈之一设置 jupyterhub docker

我正在尝试启动并运行 Jupyterhub。需要 2.7 Python 内核,所以基本上docker-stacks repo中的任何内容都会很棒。在文档中,它提到它可以使用 DockerSpawner 与 Jupyterhub 一起使用,但我不太明白它们是如何组合在一起的。有没有人知道一个简单的分步指南来完成这个工作?

0 投票
1 回答
274 浏览

ruby - Nyaplot generates no plot in iruby running in jupyterhub

I'm trying to set up a Ruby kernel within an existing multi-user jupyterhub installation. It works in all of my tests, except that plots created by nyaplot (the only plotting package I could find that works within iruby) don't show up in the notebook. For example, the following code (from one of the Nyaplot tutorials) gives no error (not even in the syslog file) but no plot:

Background:

Here's how I set up iruby to run in jupyterhub. I'm giving the entire process so (a) you can spot if anything is missing, and (b) so you know that if you say something like "add [this] to the Gemfile" you're going to have to tell me where to put the Gemfile, since jupyterhub is not running iruby out of a particular directory.

The OS is CentOS 7.3. Since its default version of ruby is too old to run iruby, I installed a version of ruby using ruby-install:

(I used ruby 2.3, instead of 2.4, because it turned out that at least one component of sciruby-full doesn't work with 2.4 yet.) After the installation, a message says that ruby is installed in /opt/rubies/ruby-2.3.4.

Next come the package installations.

I had to make sure that nothing was installed in my home directory, because in a multi-user system the other users don't have access to my home directory's files. I'm listing below all the packages I eventually installed to try to solve this problem:

Next comes installing the iruby kernel into jupyterhub.

After looking at the results of "iruby register --force",
I created the file /usr/local/share/jupyter/kernels/ruby:

In /usr/local/bin/jupyter-ruby-env.sh:

As I said, all of this works as far as basic ruby is concerned: I can run code I found in the Ruby tutorials. The only thing I don't get are plots. All of the other jupyterhub kernels I've installed (e.g., python, SageMath, Julia) have no problems plotting.

Any ideas?

0 投票
1 回答
2146 浏览

python - 如何在不让他们访问代码的情况下将 jupyter notebook 仪表板分享给某人?

因此,我在网上找到了一个演示 jupyter notebook,它带有用于调整图形输入的切换。我想与某人共享此仪表板,而不共享其背后运行的代码。

我该怎么做?我对 Jupyter Dashboards 部署非常陌生。

我看过教程,我看到“文件”下有这个选项“部署”(文件->部署为->本地仪表板。)

我在网上找到的 Jupyter 笔记本示例在此处提供了“部署为本地仪表板”选项,而我的 jupyter 没有该选项。

我在网上找到的带有“部署”选项的笔记本,但我没有

0 投票
1 回答
110 浏览

python - 用于商业 Web 应用程序演示的 jupyter/tmpnb

我想基于我们自己的专有 python 包创建一个 Web 应用程序的实时演示。在演示中,用户应该能够导入包,然后实时编写和运行简单的 Python 脚本来探索包的特性。Jupyter notebooks 的公共实例(尤其是jupyter/tmpnb的实现)) 将是一个最佳解决方案,但我担心用户将能够通过使用 Jupyter 的魔术命令(即通过访问 shell 命令)并随意浏览运行公共的服务器的目录系统来访问专有的 python 代码实例。我可以使用 Jupyter 笔记本的替代品吗?(即为演示的用户设置一个交互式实时会话,这样他们就可以在无法访问包代码的情况下对包进行 python 测试)。任何有关执行此操作的最佳方法的建议将不胜感激。非常感谢。

0 投票
1 回答
1564 浏览

python - Jupyterhub/单用户共享卷

我正在尝试在 Ubuntu 16.04 上设置一个 Jupyterhub 服务器,与https://github.com/minrk/jupyterhub-demo非常相似。

我使用此处给出的提示更改了 jupyterhub_config.py 以支持持久存储https://github.com/jupyterhub/dockerspawner#data-persistence-and-dockerspawner

但是,我想为用户团队添加一个共享的“团队”卷。我有一个包含用户名(键)和团队名(值)的字典,用于将用户映射到团队。

理想情况下,我会这样说:

但我不知道如何将另一个 {name} 映射传递给 dockerspawner。

我试着摆弄这些,但到目前为止无济于事:

有任何想法吗?

PS:这个问题与jupyterhub中的Shared, writable folder有点相关

0 投票
1 回答
619 浏览

jupyter-notebook - 在 Jupyter hub 的公共实例中:如何防止用户浏览服务器的目录系统?

有什么方法可以避免 Jupyterhub 公共实例的用户在部署公共实例的公共服务器的目录系统中导航(使用魔术命令)?(在我的特殊情况下,用户应该能够从他们的笔记本中导入给定的 python 包,但不应该能够看到该 python 包的源代码,也不能看到服务器的其他一些关键目录)。非常感谢。

0 投票
1 回答
484 浏览

jupyter - 是否有与 ~/.jupyter/custom/ 一起搜索的 custom.css 的系统位置?

对于多用户 JupyterHub 服务器,如何在用户主目录之外应用自定义,以便影响所有新用户的笔记本?

~/.jupyter/custom/custom.css没有高兴地将工作样式表从以下位置复制到以下位置:

0 投票
0 回答
69 浏览

javascript - 从 spawner 向用户显示警报消息

我们为 JupyterHub 编写了一个自定义生成器以适应我们的用例。在同一个生成器中,我们对每个用户都有内存限制,这在poll()函数中进行检查,并登录到服务器上。

我想要做的是在客户接近时向客户显示警报,比如大约 90% 的内存限制,另一个是 100%,显示进程正在被杀死。

简而言之:我需要通过该功能在客户端浏览器窗口上显示警报消息poll()

甚至可能吗?我可以使用 Flask 吗?(我在网上找到的资源是关于创建一个新服务器的。在这种情况下,我们已经有一个 jupyterhub 服务器在运行。)

编辑:这是我的客户端 Javascript:

这是poll()功能:

这是stream()功能:

Javascript 会抛出一个404 Not Found错误,这是有道理的,因为 poll() 函数仅每 30 秒运行一次。

0 投票
0 回答
165 浏览

jupyter - 使用 jupyterhub 授权令牌失败

我有一个正在运行的 jupyterhub 服务,我想以管理员权限与 REST API 交互。

文档建议我可以获得这样的授权令牌,username管理员用户在哪里:

但是,如果我在对 API 的请求中使用此令牌,则会失败:

如果我有用户密码,我可以获得一个令牌,但这在我的场景中很不方便:

我误解了它的jupyterhub token工作原理吗?