Running VS Code (Server) on a Quest Compute Node

Quest and Kellogg Linux Cluster Downtime, December 14 - 18.

Quest, including the Quest Analytics Nodes, the Genomics Compute Cluster (GCC), the Kellogg Linux Cluster (KLC), and Quest OnDemand, will be unavailable for scheduled maintenance starting at 8 A.M. on Saturday, December 14, and ending approximately at 5 P.M. on Wednesday, December 18. During the maintenance window, you will not be able to login to Quest, Quest Analytics Nodes, the GCC, KLC, or Quest OnDemand submit new jobs, run jobs, or access files stored on Quest in any way including Globus. For details on this maintenance, please see the Status of University IT Services page.

Quest RHEL8 Pilot Environment - November 18.

Starting November 18, all Quest users are invited to test and run their workflows in a RHEL8 pilot environment to prepare for Quest moving completely to RHEL8 in March 2025. We invite researchers to provide us with feedback during the pilot by contacting the Research Computing and Data Services team at quest-help@northwestern.edu. The pilot environment will consist of 24 H100 GPU nodes and seventy-two CPU nodes, and it will expand with additional nodes through March 2025. Details on how to access this pilot environment will be published in a KB article on November 18.

VS Code Server allows Quest users to run VS Code on the Quest compute nodes access it in through browser.

If you're running into an issue with the desktop version of VS Code having difficulties connecting remotely to Quest, please update your desktop version.  VS Code pushed out a previous version which broke this capability and promptly rolled out a patch to fix the issue.

 

VS Code Server can be launched and run on a Quest compute node through an interactive job or batch job on Quest.

To schedule the interactive job from the command line on Quest, ssh into a Quest log-in node and type:

srun -A <allocation_name> -p <queue_name> -N 1 --ntasks-per-node=1 --mem-per-cpu=4G --time=04:00:00 --pty bash -l

This example requests a single core for a 4 hour job. Substitute an active allocation name and queue name, for example if using allocation p12345 this might be:

srun -A p12345 -p short -N 1 --ntasks-per-node=1 --mem-per-cpu=4G --time=04:00:00 --pty bash -l

Note that the more cores requested, the longer the wait for the interactive session to start. Do not request more than 1 node for VS Code Server sessions.

Once the session begins, get the name of the compute node that you were scheduled to by running the command hostname, e.g.,

$ hostname
qnode0372

Next load the VS Code Server module, vscode-server/4.12.0, which will display to you a short hand version of the instructions that you see here.

[qnode0372 ~]$ module load vscode-server/4.12.0
If you have not already done so, make sure you are running and interactive or
batch job.

Once you are sure that you are running a batch or interactive Slurm job, execute
the command `vscode-server <port_number>` where <port_number> should be a value
between 7000 and 8000.

Next, open a new terminal window *on your local computer* and based on the port
number and the compute node that VSCode Server is running on, you will then
tunnel to the server using the command:

`ssh -L <port_number>:localhost:<port_number> <your_netID>@quest.northwestern.edu ssh -N -L <port_number>:localhost:<port_number> qnode<number>` 

filling in the appropriate value for <port_number> and <compute_node>

Finally, in your *local browser* you can then put in the URL
`localhost:<port_number>` and connect to your VSCode Server session *where you
will be asked for a password*.

The VSCode Server password can be found be *connecting to Quest* and running
`cat ~/.config/code-server/config.yaml` and copying and pasting th value for
`password:` in this file. 

Once VS Code Server is running on the compute node, open a new terminal window on your local computer, and type:

ssh -L <port_number>:localhost:<port_number> <your_netID>@quest.northwestern.edu ssh -N -L <port_number>:localhost:<port_number> qnode<number>

In the command template above, be sure to replace <your_netID> with your netID, replace qnode<number> with the name of the compute node, and replace all <port_number> instances with the port number between 7000 and 8000 that you selected. You will be prompted for your Quest password, which will not return a prompt.

On your local computer, open up your browser and connect to http://localhost:<port_number>/. Your browser is now connected to the VSCode Server session running on Quest and you will be asked for a password.

The VS Code Server password can be found be connecting to Quest and running cat ~/.config/code-server/config.yaml and copying and pasting the value in the password: section in this file.

Note that your VS Code Server session will quit abruptly when the walltime of the interactive job comes to an end. Save often and be aware of walltime to avoid losing your work.

Was this helpful?
0 reviews
Print Article

Related Articles (3)

This article demonstrates how a user can run RStudio Server on a Quest compute node through a Slurm interactive or batch job.

Related Services / Offerings (1)

Quest, Quest Analytics Nodes, Kellogg Linux Cluster (KLC), and Genomics Compute Cluster (GCC).