如何解决当我通过端口转发导入tensorflow时,Jupyter笔记本电脑死了
我正在尝试在由网格引擎管理的大学的远程服务器PC中使用jupyter笔记本创建python和keras环境。我使用ssh连接到大学的登录服务器,并使用qlogin连接到大学的计算服务器以使用功能强大的计算机。为了使用jupyter Notebook的UI运行程序,我尝试过两次端口转发,如下面的文章所述。
https://zhiyzuo.github.io/Argon-Jupyter/
在远程jupyter笔记本中,我执行了print(socket.gethostname())以查看主机名,并验证了该代码已在大学的计算节点中正确执行。
但是,当我在这个jupyter笔记本中导入tensorflow时,我得到了错误并且内核死了。 我知道我们无法在没有AVX的PC中导入最新的tensorflow,当然大学系统的登录节点还没有AVX。但是,我验证了计算节点具有AVX,并且当我q登录到计算节点时,实际上可以在python命令行中导入tensorflow。 所以我不明白为什么会发生错误。
我执行了以下命令来连接服务器。
localPC:~$ ssh server1 -L 9900:localhost:9900
(outputs)
--------------------
Linux xxx 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3 (2019-02-02) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY,to the extent
permitted by applicable law.
Last login: Fri Oct 23 09:54:14 2020 from 000.000.00.00
----------------------
server1:~$ qlogin -q gpu.q
(outputs)
----------------------
Your job 43383 ("QLOGIN") has been submitted
waiting for interactive job to be scheduled ...
Your interactive job 43383 has been successfully scheduled.
Establishing builtin session to host server2.aaa.com ...
----------------------
server2:~$ cd projectA
server2:~/projectA$ pipenv shell
(outputs)
----------------------
Launching subshell in virtual environment...
. /path/to/$HOME/.venv/porjectA-IwBB_zea/bin/activate
server2:~/projectA$ . /path/to/$HOME/.venv/projectA-IwBB_zea/bin/activate
----------------------
(projectA)server2:~/projectA$ nohup jupyter notebook --no-browser --port 9900 > jupyter.log &
(outputs)
----------------------
[1] 17939
nohup: ignoring input and redirecting stderr to stdout
----------------------
(projectA)server2:~/projectA$ ssh server1 -R 9900:localhost:9900 -N -f
(outputs)
----------------------
Enter passphrase for key '/path/to/$HOME/.ssh/server1':
----------------------
#(enter the password)
导入张量流时收到错误消息
Kernel Restarting
The kernel appears to have died. It will restart automatically
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。