J.BF Story

[Ubuntu] Jupyter Notebook 서비스 생성(systemd) 본문

Server/Linux

[Ubuntu] Jupyter Notebook 서비스 생성(systemd)

J.BF 2022. 7. 26. 23:41
Ubuntu 18.04
conda 4.10
jupyter_server 1.4

 

1. Jupyter 서비스 파일 생성

/etc/systemd/system/jupyter-notebook-server.service

[Unit]
Description=Jupyter Notebook Server

[Service]
Type=simple
PIDFile=/run/jupyter.pid
ExecStart=/root/anaconda3/bin/jupyter-notebook --allow-root --config /root/.jupyter/jupyter_notebook_config.py

[Install]
WantedBy=multi-user.target
  • ExecStart
    • anaconda의 jupyer-notebook 실행 파일 절대경로 입력
    • jupyter_notebook_config.py파일을 연결하여 설정 적용

 

2. Jupyter 서비스 등록

systemctl daemon-reload
# 서버 재부팅 시에 서비스 자동 시작
systemctl enable jupyter-notebook-server.service
# 서비스 시작
systemctl start jupyter-notebook-server.service

 

3. Jupyter 서비스 확인

1) 서비스 상태 확인

systemctl status jupyter-notebook-server.service

2) Jupyter Notebook 웹 실행 확인

http://localhost:8888

Comments