Jupyterhub + nbextension + templates + GPU driver support
- use jupyterhub 1.5.1 for stability
- use LocalAuthenticator (create user in system)
- put
jupyterhub_config.py
intosrv/jupyterhub/jupyterhub_config.py
- (GCE) deploy jupyterhub.service from
/opt/jupyterhub/etc/systemd/jupyterhub.service
to/etc/systemd/system/jupyterhub.service
(soft link)
- by jupyterhub GUI (without password)
- root
useradd
username (X) - wrong folder path - root
passwd
userpassword
- root
useradd
username (X) - wrong folder path - root
passwd
userpassword
- root userdel uname
- root userdel -r uname (folders & buffers)
- be careful! - we shouldn't delete any user registered on the workstation.
ref : https://blog.csdn.net/weixin_48114253/article/details/117548513
sudo --login
- login to super usersudo deluser username sudo google-sudoers
take out user sudo and google-sudoers privilegessu - test
- Switch to test and simulate a full login shell: (need password)sudo ls
- [sudo] password for test:- test is not in the sudoers file. This incident will be reported.
apt-get install E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
sudo usermod -aG sudo username
- given sudo accessgroups username
- check user with permission group
tldr ufw
ufw allow from a.b.c.d to any port 22
- allow a.b.c.d to access port 22ufw status
sudo ufw status
- create a simple http server -
python -m http.server 8888
sudo ufw allow from a.b.c.d to any port 8888
- check from remote machine -
curl http://localhost:8888
- check from local machine -
curl http://a.b.c.d:8888
- - GCE with GPU Driver and GPU
- - Jupyterhub on root, deploy by
systemctl service
and JupyterTemplate, setup jupyterhub admin - setup develop user without sudo (jupyteradd and ssh users)
- - static IP
- - service account, check bigquery accessible
- - conda environment, test tf and torch
- - modified jupyter template
for developer
- - ssh for workstation and ssh-agent on workstation
- - setup repo
conda create .venv
,.venv/bin/pip install pyenv
,pipenv sync
- pre-study on GCE : 4hr
- develop using docker : 2+4 hr
- develop using gcloud : 2+3 hr
- GPU setup on gcloud : 3 hr
- CUDA, CUDAToolKit, PyTorch : 4hr + 2hr
- Total : 15hr