Jupyter via VSCode remote-ssh with singularity on ifarm

From epsciwiki
Revision as of 12:47, 17 June 2023 by Davidl (talk | contribs)
Jump to navigation Jump to search


Here are instructions for configuring your local VSCode to connect to

 #-------------------------------------------------------
 # This comes from the JLab knowledge base article here:
 # https://jlab.servicenowservices.com/kb?id=kb_article_view&sysparm_article=KB0014918&sys_kb_id=862c54221bf0d510a552ed3ce54bcb1a&spa=1 
 #
 Host ifarm ifarm???? qcdi qcdi????
 Hostname %h.jlab.org.
 Host *.jlab.org
 Hostname %h.
 Match host scilogin.jlab.org.,scilogin?.jlab.org.,login.jlab.org.,login?.jlab.org.,acclogin.jlab.org.,acclogin?.jlab.org.,hallgw.jlab.org.,hallgw?.jlab.org.
 ProxyJump none
 Match host *.jlab.org.
 ProxyJump scilogin.jlab.org.
 User davidl
 
 Match host *.jlab.org.
 ControlMaster auto
 ControlPath ~/.ssh/cm/%C.sock
 ControlPersist 10m
 #-------------------------------------------------------


In VSCode

  1. Open the command palette using Cmd+shift+P or from the gear menu in the bottom left of the window
  2. Type "settings.json" and then select Preferences: Open User Settings (JSON)
  3. Add the following to your settings (if you have other settings already, you may need to add a comma to the line before this one!):
 "remote.SSH.enableRemoteCommand": true


 # https://github.com/microsoft/vscode-remote-release/issues/3066#issuecomment-1019500216
 #
 Host epsci-ubuntu-22.04~ifarm
   HostName ifarm.jlab.org
   ProxyJump scilogin.jlab.org
   RemoteCommand singularity shell /cvmfs/oasis.opensciencegrid.org/jlab/epsci/singularity/images/epsci-ubuntu-22.04.img
   RequestTTY yes