The web-based version of Visual Studio Code (VS Code) available at OnDemand runs code-server, which provides a convenient, desktop-like experience. However, certain extensions (e.g., GitHub Copilot) may not function optimally in this environment. To address this, you can use VS Code Tunnel Mode to access a near-native VS Code experience through a web browser or your local VS Code client.
Log in to the HPC cluster using SSH. Avoid using remote desktop or interactive desktop apps from the ondemand portal, as they are unnecessary. You can use the shell access provided by ondemand for SSH connectivity.
Do not run VS Code directly on the login node. Use the salloc
command to request resources:
salloc -c 4 # Request 4 CPU cores
For GPU-accelerated workloads:
salloc -c 8 -p gpu --gres gpu:1 # Request 8 CPU cores and 1 GPU
Option A: Python Projects
If working with Python, load the Python module and activate your environment:
module load python3/2024
crun -p ~/envs/ENV_DIR code tunnel
To read more on using Python in ODU HPC cluster: Using Python
Option B: Non-Python Projects
For general use:
module load vscode
code tunnel
The first time you use Tunnel Mode, a device authentication prompt will appear in the terminal:
To grant access to the server, please log into https://github.com/login/device and use code XXXX-XXXX
XXXX-XXXX
) and click "Authorize Visual Studio Code" to complete authentication.After authentication, a link will appear in the terminal:
Open this link in your browser: https://vscode.dev/tunnel/XXXXXXXXX
To use your local VS Code editor: