UCL Department of Electronic and Electrical Engineering
Staff/Student Intranet

VS Code remote development

How to use dept GPU servers to run/debug your python code

 You can install VS Code on any platform and get it to run/debug your code on departmental GPU servers.

  • Install VS Code
  • Run VS Code and select the extensions menu item on the left and search for “remote development”.
  • Choose to install the “Remote Development” extension
  • Click in the green square in the bottom left hand corner of the screen to open a “remote window”
  • This will display a select list with a number of options –  Choose “connect to host”
  • Choose “add new ssh host”
  • Add the host as userid@host.ee.ucl.ac.uk (i.e uceelhe@london.ee.ucl.ac.uk)
  • Select the config file to update (use the default one. i.e.  in C:\users fro Windows)
  • A “Host Added” box will appear – click on “connect”
  • Choose “linux” – Choose “continue”
  • Enter password when prompted

You are now connected to the remote server. You will need to do a little bit of additional configuration to tell VS Code how to debug and run your python code on the server

  • Select the extensions menu item on the left and search for “Python”.
  • Choose to install the “Python” extension – This should install into the server that you are connected to
  • Open your python file on  the server, or create a new one
  • Hit CTRL+SHIFT+P and enter the command “Python: Select Interpreter”
  • You should see a list of detected python installs. Choose one or choose to enter the path to your own virtual env.
  • You should now be able to run/debug your python code and it will run on the server

You can add SSH connections for all of the GPU servers listed at:

https://intranet.ee.ucl.ac.uk/it/servers/gpu