Guide:  SSH into UCL Compute Cluster with VSCode
Guide:  SSH into UCL Compute Cluster with VSCode

Guide: SSH into UCL Compute Cluster with VSCode

UCL is a “top 10” university, as such, they have kindly provided us easy access to their compute cluster. In reality, it is a bottom tier virgin fest. So we have to write this guide ourselves

 
VSCode allows for SSH tunneling directly to a host machine. Allowing you to have an interactive development environment that feels just like your local machine. To make this experience as seamless as possible, you should read this entire guide.
 
This works if you use:
  • VSCode
  • A computer with ssh installed.
  • Note: you will need to request a 50 gigabyte project storage space. (See point 7)
 
  1. Install this Remote-SSH VSCode extension:
    1. notion image
  1. Finding a GPU host. You can skip this step if you already know a hostname you want to use, such as bufflehead-l . You can find the hosts here: https://tsg.cs.ucl.ac.uk/gpus/#check-GPU The following is a method to find unused hosts. Save the following code blocks into files.
    1. ⚠️ This is a powershell script that only works on windows. Making the equivalent bash script for Mac/Linux should be easy. If someone sends me it I will add it here. ssh_gpu_machine.ps1
      check_gpus.sh

      Run script:

      An unused gpu-host will have 0% GPU-Utilization. You can also check this manually using nvidia-smi in the terminal once you have connected to a manually selected host.
      Example of an Unused Host: 0% GPU-Util
      notion image
  1. Assuming ssh installed on local machine. Open the SSH configuration file with ctrl+shift+P:
    1. notion image
  1. Copy paste the configuration below and replace the red text with the unused GPU Host you found and green text with your username.
    1. Now it’s time to connect. Press ctrl+shift+P , and type “connect to host”. It will prompt you to select the host we defined in Step 4. You will then be prompted to enter your password 2-3 times.
      1. notion image
    1. Next, once connected, click “Open Folder”, which should open the root directory of the GPU Host. You should be good to go to use notebooks or whatever remotely. You can clone your repo with git, manually drag it in, etc…
    1. Pytorch and Pip environment installation
      1. Activate 3.10.14 This is the latest version of Python that is installed on the GPU Host. Also note that torch does not support Python 3.11 yet. You will need to run this every time you spin up the server.
        1. I suggest you copy .uclcs-csh-options.example , rename it .uclcs-csh-options and add the above source command at the bottom.
      2. Install torch ⚠️ You should probably delete Python 3.9 and any extra stuff to fit this installation, it will throw an error otherwise. Then you can send an email to request@cs.ucl.ac.uk and they will give you 50GB of storage in aibh/projects1/your_username to store your training data. Note, this storage space is in a different directory than your user directory and is only meant to store project data.
     
    1. Install jupyter-notebook VSCode extensions etc…

    Recommendations