You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.4 KiB
Markdown
40 lines
1.4 KiB
Markdown
First the following software needs to be installed:
|
|
|
|
`pip3 install jupyterlab notebook`
|
|
|
|
First copy the service file template to `/etc/systemd/system`:
|
|
|
|
`sudo cp templates/jupyterlab@.service /etc/systemd/system`
|
|
|
|
And then the lab.conf nginx configuration file to `/etc/nginx/includes/`:
|
|
|
|
`sudo nano templates/lab.conf` (change `sandbot` to the servername)
|
|
`sudo mkdir /etc/nginx/includes`
|
|
`sudo cp templates/lab.conf /etc/nginx/includes/`
|
|
|
|
Now you can use the make_user_accounts.py script with the following scripts:
|
|
|
|
* `--passwords`: words.txt -- a txt file with ingredient words on each line to generate passwords with
|
|
* `--from_file`: users.txt -- a txt file with a username on each line
|
|
* `--servername`: sandbol -- a string
|
|
|
|
The script generates:
|
|
|
|
* `users.csv`: a list of all the users, their personal ports, their passwords
|
|
* `users.md`: a bulletpoint list with a link to the `/__LAB__/` link for each user
|
|
* `users.nginx.conf`: snippets of nginx configuration that can be added to the main nginx config file
|
|
|
|
This service file is a template for all the jupyter lab services that are running, which is one for each user.
|
|
|
|
Now add the generated nginx configurations for each jupyterlab instance:
|
|
|
|
`cat users.nginx.conf`
|
|
`sudo nano /etc/nginx/sites-available/default`
|
|
|
|
And convert the markdown into HTML to add links to the index page:
|
|
|
|
`pandoc users.md -o users.html`
|
|
|
|
Now try to start one jupyterlab instance with:
|
|
|
|
`sudo systemctl start jupyter@murtaugh` |