Versun

对待生命,不妨大胆一点,因为我们终将失去它

vim /lib/systemd/system/jupyter.service /
这个目录不同发行版可能也不同

[Unit]
Description=jupyter
After=network.target
[Service]
Tpye=forking
EnvironmentFile=/usr/local/bin/jupyter-notebook
ExecStart=/usr/local/bin/jupyter-notebook
ExecStop=/usr/bin/pkill jupyter-notebook
KillMode=process
Restart=on-failure
RestartSec=30s
[Install]
WantedBy=multi-user.target

创建好之后再操作下就行了
bash
systemctl daemon-reload
systemctl start jupyter
systemctl enable jupyter

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注