manetta af4d31e855 | 11 months ago | |
---|---|---|
html | 4 years ago | |
templates | 3 years ago | |
README.md | 11 months ago | |
make_user_accounts.py | 11 months ago | |
reset_jupyter_password.py | 2 years ago |
README.md
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 passwordsusers.md
: a bulletpoint list with a link to the/__LAB__/
link for each userusers.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