Connect Spyder to a console in a docker container on a remote host

随声附和 提交于 2019-12-08 10:42:44

问题


I am using a docker on a remote AWS EC2 instance to run my code. My current workflow is to edit code on a local machine, push it to git and then log into the EC2 machine and the docker container in it, to pull the code and run it. I was wondering if I could somehow attach Spyder's console to the kernel inside the docker, in the EC2 instance.

So my sequence of log-ins are:

localhost~: ssh -XYA remote-ec2.domain.ext remote-ec2~: ssh -XYA root@localhost -p 2222 (docker)~: python runme.py

I found a tutorial to use an SSH connected kernel, but I am wondering how to tunnel through to the docker inside.


回答1:


(Spyder maintainer here) This is possible and not that hard. Please read our documentation on how to achieve it.



来源:https://stackoverflow.com/questions/53891567/connect-spyder-to-a-console-in-a-docker-container-on-a-remote-host

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!