您好,我正在使用nipype进行神经影像分析。我正在使用通过以下命令启动的Docker容器。
docker run -it -p 8888:8888 miykael/nipype_tutorial jupyter notebook
此命令在终端中提供以下信息:
> [I 14:12:08.480 NotebookApp] [nb_conda_kernels] enabled, 2 kernels > found [I 14:12:08.492 NotebookApp] Writing notebook server cookie > secret to > /home/neuro/.local/share/jupyter/runtime/notebook_cookie_secret [I > 14:12:09.130 NotebookApp] [jupyter_nbextensions_configurator] enabled > 0.4.0 [I 14:12:09.182 NotebookApp] JupyterLab beta preview extension loaded from > /opt/conda/envs/neuro/lib/python3.6/site-packages/jupyterlab [I > 14:12:09.182 NotebookApp] JupyterLab application directory is > /opt/conda/envs/neuro/share/jupyter/lab [I 14:12:09.520 NotebookApp] > [nb_conda] enabled [I 14:12:09.524 NotebookApp] Serving notebooks from > local directory: /home/neuro/nipype_tutorial [I 14:12:09.525 > NotebookApp] 0 active kernels [I 14:12:09.525 NotebookApp] The Jupyter > Notebook is running at: [I 14:12:09.525 NotebookApp] > http://0.0.0.0:8888/?token=3e77fadd170dcc14de7e9ecd9bfb0cc3b26e4da430a8eee2 > [I 14:12:09.526 NotebookApp] Use Control-C to stop this server and > shut down all kernels (twice to skip confirmation). [W 14:12:09.527 > NotebookApp] No web browser found: could not locate runnable browser. > [C 14:12:09.527 NotebookApp] > > Copy/paste this URL into your browser when you connect for the first time, > to login with a token: > http://0.0.0.0:8888/?token=3e77fadd170dcc14de7e9ecd9bfb0cc3b26e4da430a8eee2 > [I 14:12:19.671 NotebookApp] 302 GET > /?token=3e77fadd170dcc14de7e9ecd9bfb0cc3b26e4da430a8eee2 (172.17.0.1) > 1.04ms [I 14:12:32.713 NotebookApp] Creating new file in [I 14:12:47.595 NotebookApp] Saving file at /test.txt
然后我将上面的URL复制到浏览器中,以访问jupyter笔记本GUI并继续进行分析。
然后在进行一些更改后停止容器(或退出终端)。例如,如果我使用jupyter notebook创建新的python脚本并保存它们,那么当我重新启动实例时,我想继续使用这些脚本。
我不知道如何重新启动同一终端并打开jupyter笔记本来访问相同的已保存文件。有人可以帮我吗?
我知道我不完全了解docker,容器和实例。我已经尝试了一些教学视频,但无法在连接相同端口以获取jupyter笔记本的URL的同时,了解发生了什么以及如何重新启动实例。