Using VScode to access the HPC

2 minute read

One of the biggest hurdles to using a the high performance computer (HPC) at JCU is the user interface. Researchers have to ssh into the HPC via the command line. This command line only interface can be very different from the day to day computer experience researchers are used to. To ease the transition to remote computing, I suggest that researchers should use an integrated development environment (IDE) to access the HPC.

An IDE is basically a file explore, a text editor, and terminal all in one. There are many types of IDEs, the IDE researchers would be most used to is RStudio. While RStudio is an excellent IDE for R programming it is very specific and thus not the ideal solution for everyone. A more general IDE is Visual Studio Code (VScode).

Worldwide, Visual Studio is the most popular IDE, Visual Studio Code grew the most in the last 5 years… Top IDE index

VScode is a fully featured IDE produced by Microsoft. VScode is open source and quickly become the default for IDEs. Check out the Github repo.

Use VScode to access the HPC

Download VScode and start to get a feel for how it works on you local machine. There’s some very good docs on how to get started.

Because it is open source VScode is easily extendable. VScode has an extensive library of extensions. One extension of note is Remote - SSH, this is a core extension developed by Microsoft. The Remote - SSH extension lets you connect VScode to a remote server (like the HPC) via SSH.

Remote

Use the Extensions tab to install Remote - SSH. Once it’s installed a new tab (Remote Explorer) appears on the side panel. Press the plus (+) in the Remote Explorer tab to add a new SSH target for the HPC.

ssh-command Only include -p 8822 if you are off campus.

After you enter your SSH connection command enter your password and connect to the HPC. In the Explore tab you can now open folders and files on the HPC. Copying files to the HPC or back to you local machine is as easy as dragging and dropping them into the Explorer panel. If you open a new terminal (control+shift+`) you’ll open a terminal on the HPC.

vscode-hpc

When you’re finished you can simply save and close VScode. Any changes will be saved on the HPC. To reconnect to the HPC, open VScode and go to the Remote Explorer panel click on the folder icon next to zodiac.hpc.jcu.edu.au.

ssh-readme

For more information check out the Remote - SSH docs or this helpful blog.

Comments