Jupyter Hub (Multi-User-Modus) mit systemd betreiben
English
Deutsch
Das folgende Skript installiert Jupyter Hub im Single-User-Modus (d.h. nur ein einzelner Linux-Benutzer kann sich über die Weboberfläche bei Jupyter Hub anmelden).
Voraussetzungen
Zuerst Python & PIP installieren, dann NodeJS, dann Jupyter Hub, dann configurable-http-proxy:
install_jupyterhub_deps.sh
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs python3-pip
pip install -U jupyterhub
sudo npm i -g configurable-http-proxyJupyter-Hub-systemd-Dienst installieren
Das folgende Skript mit sudo ausführen!
install_jupyterhub_service.sh
#!/bin/bash
# This script installs and enables/starts the JupyterHub systemd service
export NAME=JupyterHub
# Create service file
cat >/etc/systemd/system/${NAME}.service <<EOF
[Unit]
Description=${NAME}
[Service]
Type=simple
ExecStart=/usr/bin/env jupyterhub --port=11569
User=root
Group=root
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
EOF
# Enable and start service
systemctl enable --now ${NAME}Dieses Skript installiert einen systemd-Dienst namens JupyterHub und startet diesen automatisch beim Booten. Standardmäßig läuft er auf Port 11569.
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow