首页 > 解决方案 > 有没有更好的方法来运行 Jupyter Notebook?

问题描述

我在家里的 Synology DS220+ NAS 上运行我的 jupyter notebook 内核。在开始努力让它运行之后,我设法做到了,但是我想知道是否有更好的方法?

所以每天我通过我的 cmd 终端运行以下命令:

C:\WINDOWS\system32>ssh -L localhost:8888:localhost:8888 id@192.168.0.128 -p 3022
id@192.168.0.128's password:
id@SynologyName:~$ source venv/bin/activate
(venv) admin@SynologyName:~$ export PATH="$HOME/.local/bin:$PATH"
(venv) admin@SynologyName:~$ export JUPYTER_RUNTIME_DIR=/tmp
(venv) admin@SynologyName:~$ jupyter notebook
[I 09:57:03.105 NotebookApp] Writing notebook server cookie secret to /tmp/notebook_cookie_secret
[I 09:57:04.464 NotebookApp] Serving notebooks from local directory: /volume1/homes/admin
[I 09:57:04.464 NotebookApp] Jupyter Notebook 6.2.0 is running at:
[I 09:57:04.464 NotebookApp] http://localhost:8888/?token=cc99703780fd34362346d0aefd07c561bf0ecfffc08e1f18
[I 09:57:04.464 NotebookApp]  or http://127.0.0.1:8888/?token=cc99703780fd34362346d0aefd07c561bf0ecfffc08e1f18
[I 09:57:04.464 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 09:57:04.471 NotebookApp] No web browser found: could not locate runnable browser.
[C 09:57:04.471 NotebookApp]

    To access the notebook, open this file in a browser:
        file:///tmp/nbserver-4444-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=cc99703780fd34362346d0aefd07c561bf0ecfffc08e1f18
     or http://127.0.0.1:8888/?token=cc99703780fd34362346d0aefd07c561bf0ecfffc08e1f18

有没有更好的方法让我跳过这段代码而没有内核无法启动?

(venv) admin@SynologyName:~$ export PATH="$HOME/.local/bin:$PATH"
(venv) admin@SynologyName:~$ export JUPYTER_RUNTIME_DIR=/tmp

标签: python-3.xwindowsjupyter-notebooksynology

解决方案


推荐阅读