Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Notebook server for multiple users #2440

Open
ZelphirKaltstahl opened this issue Apr 24, 2017 · 10 comments
Open

Run Notebook server for multiple users #2440

ZelphirKaltstahl opened this issue Apr 24, 2017 · 10 comments
Labels

Comments

@ZelphirKaltstahl
Copy link

Disclaimer: This is not really an issue, but more of a question and I did not know where else to ask this (a mailing list?).

I want to deploy one (or more than one) notebook server online, so that many people can access it without login and they all have their own notebook instances of a single notebook file, so that no user sees any modifications of another user or can use their Python kernels with all the variables set. I do not need any login. In fact any login would increase the obstacles to use my notebook and is undesirable in my scenario. I don't want people having to sign up for anything. They shall remain anonymous. I want this for allowing anyone to test my notebook.

I know about the project JupyterHub, however, I'd like to avoid using it for such open structure. From working with JupyterHub before, I know that JupyterHub is a huge amount of unstructured code (thousands of lines in one file, every object talking to every other object, no UML diagrams in documentation to help getting an overview, hard to refactor anything without breaking stuff). It is functioning, but it does much more than I need and on a first search, I could not even find the docs for disabling user logins in it. If I have no choice, I'll use it, but it requires me to dabble in so many different things like user database, which spawner to use, how to configure the spawner, how to disable login completely, resource management per configuration files and probably others.
I'd rather take one or two days and write my own minimal server, on top of some of the minimalistic webservers Python has, which simply uses dockerpy to spawn a container for each visitor of some route on my server with some predefined resource limitation. I'd have to think about how to link an anonymous visitor with the respective container though.

Is there a way to use plain notebook servers (for example inside a docker container) in such an open way for multiple users, without one user being able to see context of another user?
Or maybe any minimal multi user server, which is lightweight in comparison to JupyterHub?
Is writing my own realistic, or is linking visitors to their respective docker containers a difficult task?

@takluyver
Copy link
Member

It sounds like tmpnb might be what you're after. It doesn't use logins, but gives each user who connects their own notebook server in a docker container. Once the user leaves the page, their server is automatically culled to reclaim resources for more users.

@ZelphirKaltstahl
Copy link
Author

This looks indeed like what I am after. I'll give it a try and see, thanks!

@sandys
Copy link

sandys commented May 11, 2017

I have this exact same issue (and I know of multiple people who do). Context: this was a discussion that started on hacker news: https://news.ycombinator.com/item?id=14036145

basically the simplest, bare-minimum usecase is jupyter with two roles: "editor" and "user". Editor can edit... user can just run (including dashboards). Without any of the jupyterhub needs or anything.
This will solve 95% of multi-user usecases.

@ZelphirKaltstahl
Copy link
Author

@sandys It rather sounds like multiple people working on one and the same instance of a notebook, being able to cooperate. While that's interesting, it is not what I am looking for. Still thanks for the link, it might be interesting in the future and for other people who stumble over this question.

@ZelphirKaltstahl
Copy link
Author

For what it is worth: I ended up using jupyterhub-tmpauthenticator.

@sandys
Copy link

sandys commented May 12, 2017

Actually, it is exactly what you requested. We wanted to build dashboards by one person and have everyone else use it.
This is the most common use case that everyone usually has.

@ZelphirKaltstahl
Copy link
Author

@sandys What do you mean by "and have everyone else use it." ? Can you be more specific about that particular part?

This could either be what I want, or something different, depending on how it is interpreted. To be clear, what is discussed on ycombinator to me seems to be collaboration of people on one and the same instance of a notebook. If you read my original post I actually specifically excluded that:

[...] they all have their own notebook instances of a single notebook file, so that no user sees any modifications of another user or can use their Python kernels with all the variables set. [...]

Collaboration would not be what I want, while it would still be interesting for other projects. However, if you mean to say by that phrase, that everyone gets their own instance of the notebook, being unable to see others, then it would be what I wanted.

@sandys
Copy link

sandys commented May 13, 2017 via email

@ZelphirKaltstahl
Copy link
Author

@sandys I guess it is what I am looking for, except the part about speadsheet like and users not being able to edit formulas.

@elgalu
Copy link
Contributor

elgalu commented Nov 23, 2017

What about this project https://github.com/sagemathinc/cocalc ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants