新建编辑服务命令
sudo vim /etc/systemd/system/jupyter.service
输入配置
[Unit]
Description=Jupyter Notebook
[Service]
User=xxx
ExecStart=/usr/bin/bash -c "/home/xxx/anaconda3/bin/jupyter-notebook /mnt/f/Jupyter"
#"conda run -n ChatGLM2 streamlit run /mnt/f/Git/ChatGLM2-6B/web_demo2.py"
WorkingDirectory=/mnt/f/Jupyter
[Install]
WantedBy=multi-user.target
启动服务
systemctl daemon-reload
sudo systemctl enable jupyter.service
sudo systemctl start jupyter.service