Jupyter: Difference between revisions
From FlowerHouseWiki
Line 42: | Line 42: | ||
== Configuration == | == Configuration == | ||
=== Create Config-File === | |||
<p>Create folder for config</p> | |||
<syntaxhighlight lang="console"> | |||
mkdir /etc/jupyterhub | |||
</syntaxhighlight> | |||
<p>Generate Config-File</p> | |||
<syntaxhighlight lang="console"> | |||
jupyterhub --generate-config -f /etc/jupyterhub/jupyterhub_config.py | |||
</syntaxhighlight> | |||
=== Create systemd service === | |||
<p>Create service file</p> | |||
<syntaxhighlight lang="console"> | |||
nano /etc/systemd/system/jupyter.service | |||
</syntaxhighlight> | |||
<p>Add this content to file</p> | |||
<syntaxhighlight lang="console" line> | |||
[Unit] | |||
Description=Jupyterhub | |||
After=syslog.target network.target | |||
[Service] | |||
User=root | |||
Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/anaconda3/bin" | |||
ExecStart=jupyterhub -f /etc/jupyterhub/jupyterhub_config.py | |||
[Install] | |||
WantedBy=multi-user.target | |||
</syntaxhighlight> |
Revision as of 20:21, 16 December 2021
IP: | 192.168.88.18 |
---|---|
MAC: | 6A:1B:42:9D:D6:4B |
Domain: | jupyter.flowerhouse.at |
OS: | Debian Bullseye |
---|---|
RAM: | 4096MB |
Cores: | 4 |
Privileged: | No |
The Jupyter-LXC is reachable under 192.168.88.18
which is located in the ServerVLAN.
The subdomain is jupyter.flowerhouse.at which is handled by the ReverseProxy.
Basic Setup
Installation
Install required packages
apt install python3-pip npm
Install JupyterHub, responsible for managing multiple users
python3 -m pip install jupyterhub
Install Proxy needed by JupyterHub
npm install -g configurable-http-proxy
Install webinterface and notebook
python3 -m pip install jupyterlab notebook
Kernel
Install SageMath Kernel
apt install sagemath
Configuration
Create Config-File
Create folder for config
mkdir /etc/jupyterhub
Generate Config-File
jupyterhub --generate-config -f /etc/jupyterhub/jupyterhub_config.py
Create systemd service
Create service file
nano /etc/systemd/system/jupyter.service
Add this content to file
[Unit]
Description=Jupyterhub
After=syslog.target network.target
[Service]
User=root
Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/anaconda3/bin"
ExecStart=jupyterhub -f /etc/jupyterhub/jupyterhub_config.py
[Install]
WantedBy=multi-user.target