LoginSignup
0
0

More than 1 year has passed since last update.

centos7 + jupyter lab 環境構築メモ

Posted at

以下URLを参照
https://uktia.hatenablog.jp/entry/20200712/1594545810
https://qiita.com/taka4sato/items/2c3397ff34c440044978

useradd -s /bin/bash -d /opt/jupyter jupyter
su - jupyter -c 'pip3 install -U pip --user'
su - jupyter -c 'pip3 install -U jupyterlab --user'

su - jupyter -c 'jupyter notebook --version'
su - jupyter -c 'mkdir ~/.jupyter/'

su - jupyter -c 'tee ~/.jupyter/jupyter_notebook_config.py << _EOF_ > /dev/null
c = get_config()
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8080
c.NotebookApp.token = ''
_EOF_'

tee -a /etc/systemd/system/jupyter.service << _EOF_ > /dev/null
[Unit]
Description=Jupyter notebook

[Service]
Type=simple
PIDFile=/var/run/jupyter-notebook.pid
ExecStart=/opt/jupyter/.local/bin/jupyter lab
User=jupyter
Group=jupyter
WorkingDirectory=/opt/jupyter
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target
_EOF_

systemctl daemon-reload
systemctl start jupyter
systemctl enable jupyter

firewall-cmd --permanent --add-port 8080/tcp 
firewall-cmd --reload

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0