setup documentation for jupyterpi
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
manetta 16a83ac8a1 switch from notebook.auth to jupyter_server.auth 2 个月前
html Update 'html/INSTALLATION_NOTES.md' 3 年前
templates Add 'templates/lab.conf' 3 年前
README.md edit in lab.conf is needed 2 个月前
make_user_accounts.py changing the "shared" symlink into "www" 2 个月前
reset_jupyter_password.py switch from notebook.auth to jupyter_server.auth 2 个月前

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 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