Jump to content

Using VSCode with Firebird: Difference between revisions

From Swarthmore Knowledge Base
No edit summary
Jsimms1 (talk | contribs)
mNo edit summary
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
VSCode is a popular software development suite that can allow users to develop locally and then connect to a remote system (such as Firebird) to execute intensive tasks. While convenient, the main issue with VSCode is that the '''Remote-SSH''' extension runs <code>vscode-server</code> processes on the Firebird login node. These processes can be surprisingly resource-intensive (CPU and RAM) even when idle and they often fail to terminate when a user disconnects. There is, however, a solution that has worked well for multiple researchers.
VSCode is a popular software development suite that can allow users to develop locally and then connect to a remote system (such as Firebird) to execute intensive tasks. While convenient, the main issue with VSCode is that the '''Remote-SSH''' extension runs <code>vscode-server</code> processes on the Firebird login node. These processes can be surprisingly resource-intensive (CPU and RAM) even when idle and they often fail to terminate when a user disconnects. There is, however, a solution that has worked well for multiple researchers.


= Prerequisites =
== Prerequisites ==
 
As prerequisites, you need:
As prerequisites, you need:


Line 8: Line 7:
* VSCode installed on your local system, with '''Remote Explorer''' and '''Remote SSH''' extensions installed.
* VSCode installed on your local system, with '''Remote Explorer''' and '''Remote SSH''' extensions installed.


= Usage =
== Usage ==


This method is based on [https://docs.rc.fas.harvard.edu/kb/vscode-remote-development-via-ssh-or-tunnel/ these instructions]. Essentially, you include steps within a Slurm batch script to download VSCode in your job’s temporary working (scratch) folder, unpack it, and launch a tunnel. Sample code for such a script is below, though it will need to be modified for your specific jobs:
This method is based on [https://docs.rc.fas.harvard.edu/kb/vscode-remote-development-via-ssh-or-tunnel/ these instructions]. Essentially, you include steps within a Slurm batch script to download VSCode in your job’s temporary working (scratch) folder, unpack it, and launch a tunnel. Sample code for such a script is below, though it will need to be modified for your specific jobs:


<syntaxhighlight lang="text">
<syntaxhighlight lang="bash" copy line>
#!/bin/bash
#!/bin/bash
#SBATCH -p compute
#SBATCH -p compute
Line 33: Line 32:
$MY_SCRATCH/code tunnel --accept-server-license-terms --name cannontunnel
$MY_SCRATCH/code tunnel --accept-server-license-terms --name cannontunnel
</syntaxhighlight>
</syntaxhighlight>
 
[[Category:Firebird]]
 
[[Category:Teaching, Learning, Research]]
 
 
<!-- Imported from Confluence page id=861503496 (https://swatkb.atlassian.net/wiki/spaces/ACADTECH/pages/861503496/Using+VSCode+with+Firebird) -->[[Category:Firebird]]

Latest revision as of 15:03, 5 August 2026

VSCode is a popular software development suite that can allow users to develop locally and then connect to a remote system (such as Firebird) to execute intensive tasks. While convenient, the main issue with VSCode is that the Remote-SSH extension runs vscode-server processes on the Firebird login node. These processes can be surprisingly resource-intensive (CPU and RAM) even when idle and they often fail to terminate when a user disconnects. There is, however, a solution that has worked well for multiple researchers.

Prerequisites

As prerequisites, you need:

  • an account on Github (either a personal account or through Swarthmore’s Github Enterprise)
  • VSCode installed on your local system, with Remote Explorer and Remote SSH extensions installed.

Usage

This method is based on these instructions. Essentially, you include steps within a Slurm batch script to download VSCode in your job’s temporary working (scratch) folder, unpack it, and launch a tunnel. Sample code for such a script is below, though it will need to be modified for your specific jobs:

#!/bin/bash
#SBATCH -p compute
#SBATCH --mem=16g
#SBATCH --time=04:00:00
#SBATCH -c 4

set -o errexit -o nounset -o pipefail

MY_SCRATCH=$(TMPDIR=/scratch mktemp -d)

echo $MY_SCRATCH

#Obtain the tarball and untar it in $MY_SCRATCH location to obtain the
#executable, code, and run it using Github
curl -Lk 'https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64' | tar -C $MY_SCRATCH -xzf -
VSCODE_CLI_DISABLE_KEYCHAIN_ENCRYPT=1 $MY_SCRATCH/code tunnel user login --provider github

#Accept the license terms & launch the tunnel
$MY_SCRATCH/code tunnel --accept-server-license-terms --name cannontunnel