We had these instructions for Greene with ssh keys, they need to be updated for Torch:
Connect VSCode to Singularity Jupyter Notebook Environments
Some users want to remotely work on Jupyter Notebooks using their Singularity kernels. This is a tedious, error prone process.
Step 1: Configure SSH for keyless ssh login
generate an ssh key with ssh-keygen
$ ssh-keygen -t rsa -b 4096 Generating public/private rsa key pair. Enter file in which to save the key (~/.ssh/id_rsa):greene_NetID
Append the public key (~/.ssh/greene_.pub) to the Greene ~/.ssh/authorized_keys
Step 2: Configure local ssh config
Update your ~/.ssh/config accordingly:
Host [greene.hpc.nyu.edu](http://greene.hpc.nyu.edu/)
HostName [greene.hpc.nyu.edu](http://greene.hpc.nyu.edu/)
User NetID
ForwardAgent yes
StrictHostKeyChecking no
IdentityFile ~/.ssh/greene_NetID
Host greene-compute
HostName gv001 # Note, this will change to whatever compute node you're on
User NetID
ProxyJump @[greene.hpc.nyu.edu](http://greene.hpc.nyu.edu/)
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
LogLevel ERROR
Please note that sometimes the IdentityFile won't work unless you use the standard id_rsa and id_rsa.pub. If the specified file doesn't work try it with id_rsa.
Step 3: Connect
Install VSCode Extension SSH Explorer and Configure Extension Settings
Configure SSH Explorer Check off Remote.SSH: Lockfiles In Tmp Uncheck Remote.SSH: Use Flock
Install VSCode Extension Jupyter and Configure Extension Settings Select Jupyter › Experimental: Kernel Picker Type --> choose 'Stable' Uncheck Jupyter: Show Only One Type Of Kernel (this shows all available kernels, including remote ones)
Set up Singularity environment like OOD Environment (including Kernel) [https://sites.google.com/nyu.edu/nyu-hpc/hpc-systems/greene/software/open-ondemand-ood-with-condasingularity](https://urldefense.proofpoint.com/v2/url?u=https-3A__sites.google.com_nyu.edu_nyu-2Dhpc_hpc-2Dsystems_greene_software_open-2Dondemand-2Dood-2Dwith-2Dcondasingularity&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=0kZUe3R5FsB9NZ72rjPBAA&m=oGM-ioB5byl-cpCEMt2NRrArMjBdflA1jXEPLkiS6OOGVkyd8v-gX6qZaA4s4gBq&s=BZN0aB1o5iMM4cncAk0A3IbGY_F9doJHEmN4AC6upyw&e=)
Start a job and set up SSH to connect to a greene-compute node [https://sites.google.com/nyu.edu/nyu-hpc/training-support/general-hpc-topics/vs-code#h.p_ID_124](https://urldefense.proofpoint.com/v2/url?u=https-3A__sites.google.com_nyu.edu_nyu-2Dhpc_training-2Dsupport_general-2Dhpc-2Dtopics_vs-2Dcode-23h.p-5FID-5F124&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=0kZUe3R5FsB9NZ72rjPBAA&m=oGM-ioB5byl-cpCEMt2NRrArMjBdflA1jXEPLkiS6OOGVkyd8v-gX6qZaA4s4gBq&s=lPiJg2JICJhrmH-rxg18AaviqJVtB4HxQeZI7JTzkWc&e=) Update the ~/.ssh/config settings to point to the current compute node
Connect VSCode to the greene-compute node
Open the appropriate .ipynb file (jupyter notebook)
Select your Singularity environment kernel
We had these instructions for Greene with ssh keys, they need to be updated for Torch: