I’m trying to build a nice lab for a course I’m going to lecture on.
What I’m trying to do, is to use binderhub to create jupyterlab servers for the students. Each one of them would use the binderhub shareable URL, and each one would get his lab.
The course is going to take several days, and becasue of that I’m looking for a way for the students to login to their labs. Of course, if they would access the sharable url of binderhub, it would fail because they already have a running lab. Moreover, even if they would save their lab’s url, it would ask them for a token they don’t have.
Umm… I want every course to get the same lab(But each user gets its own instance, of course), and I have multiple classes, and each class would get another lab(For example - Basic Python for one class, advanced python for another class, etc).
BTW, when you said Z2JH, you mean Zero To JupyterHub? I am new to all this subject…
A BinderHub is a special kind of JupyterHub that builds software environments on the fly. A JupyterHub is a way to provide access to compute resources to a group of people where JupyterLab or Jupyter Notebook is a good interface, and usually distributes the same environment (though multiple options can be provided). On JupyterHub, each user gets their own instance and their own persistent storage (BinderHubs do not have persistence by default). In our experience, most folk hosting classes go with the JupyterHub option, rather than the BinderHub option.
Zero to JupyterHub (z2jh) is a distribution of JupyterHub designed to run on Kubernetes and allows for scaling to the current level of traffic (students logging in) https://z2jh.jupyter.org
The Littlest JupyterHub (tljh) is another distribution of JupyterHub designed to run on a single server and can host up to 100 users https://tljh.jupyter.org
So when you say ‘lab’, are you referring to software environment?
About using BinderHub - I want a nice interface to build new environments for each class I am going to make. For example - If I’m getting a class about basic python - I want to build a Git repo for the notebooks , and using binder to build for them environment. Similar, If I would get a class for advanced python - building a Git repo for it, and using BinderHub to build them environment. I want to be able to add classes without deploying anything.
About persistent storage - I am creating S3 bucket for each user, and instructing them to use that for persistent storage. For that I am using the pre_start_hook of the spawner.
The lab is just a JupyterLab instance with the notebooks for the students to do.
Is there any way to reproduce BinderHub behaviour when it is spawns a new JupyterLab server? To authenticate against the URL that BinderHub is creating for the environment, and redirect the students to their JupyterLab without providing token?
Hey @manics ,
Well… It does not doing that for me. If I’m using the BinderHub env URL(What it provides for the Git repo), it fails telling the user already have a running instance.
However, when I’m trying to access to the Lab’s URL provided by BinederHub, I’m getting the following error:
Found built image, launching...
Launching server...
Launch attempt 1 failed, retrying...
Launch attempt 2 failed, retrying...
Launch attempt 3 failed, retrying...
User user1 already has the maximum of 1 named servers. One must be deleted before a new server can be created
Increase the limit per user. The thing that’s going wrong here is that the spawner is trying to create a new pod with the same name, and it can’t do that when one already exists.
Hey @sgibson91 , thanks again about your comment and help!
About increasing the namedServerLimitPerUser - If I would do that, then the student won’t be able to return to his own lab - he would get a fresh new one, and sometimes I would want them to work on the Lab for some time… That’s why I want them to be able tu return to their own labs.
I would try to use repo2docker and JupyterHub, it would take some time to deploy though… Would update about the results
Once you have your JupyterHub deployed, 2i2c has a lot of information about how to create environments using the repo2docker action and distributing content with nbgitpuller User environment and interface — Hub Service Guide