0

I connect myself to this remote cluster via PuTTY client. This works when I have written scripts to run or I'm running something in bash. But recently I figured out how to connect Spyder IDE to this remote cluster, so I can write Python code "locally", but execute it on the cluster. To first connect my Spyder IDE to my remote cluster, I log in to my cluster server and start my custom bash alias via code:

'cd $HOME/spyder_kernel; module load conda; source activate py38; python -m spyder_kernels.console - matplotlib=’inline’    --ip=127.0.0.1 -f=./remotemachine.json'

In a nutshell, I change directory to where my spyder kernel is, I load conda, and I load my virtual environment named py38 in which I have spyder-kernels module installed. This creates remotemachine.json. I copy this file to my local environment.

Next step is opening another PuTTY configuration, and under Connection-SSH-Tunnels I need to add all ports written in .json file. I've provided example (numbers are fudged) how this looks like below.

Link to image

I have to manually input each and every port under Source port and Destination. I thought about saving settings, but numbers for ports change.

Is there a way to load the .json file in PuTTY, and have the Forwarded ports auto complete?

0 Answers0