Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| habrok:connecting_to_the_system:connecting_via_vsc [2024/05/13 14:21] – admin | habrok:connecting_to_the_system:connecting_via_vsc [2026/04/28 12:52] (current) – [Connecting with VS Code via SSH] pedro | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Advanced: Connecting to Hábrók with Visual Studio Code ====== | ====== Advanced: Connecting to Hábrók with Visual Studio Code ====== | ||
| - | [[https:// | + | [[https:// |
| - | ===== Connecting | + | There is a separate section on using Python virtual environments: |
| + | |||
| + | ===== Using the web portal ===== | ||
| + | The simplest and most straightforward way of using VS Code on Hábrók is by using our [[https:// | ||
| + | |||
| + | As soon as the job has started and is ready, you should see a blue button to Connect to VS Code. This will automatically start up your VS Code session in the compute | ||
| + | |||
| + | If you are using VS Code to program in Python, you should take a look at the [[..: | ||
| + | ===== Connecting with VS Code via SSH ===== | ||
| + | <WRAP center round tip 60%> | ||
| + | Connecting via SSH requires the setup below, which involves a number of steps. If you simply mean to quickly edit a script or do basic software development, | ||
| + | </ | ||
| + | |||
| + | If you'd like to run the VS Code client natively in your desktop, you can also do so by setting up a Remote-SSH connection. This takes some additional setup when compared with the connection via the [[https:// | ||
| + | |||
| + | ==== Connecting with VS Code via SSH to an access node ==== | ||
| - If you haven' | - If you haven' | ||
| Line 18: | Line 33: | ||
| - | ===== Connecting with VS Code to a compute node===== | + | ==== Connecting with VS Code via SSH to a compute node ==== |
| In addition to connecting to one of the login or interactive nodes, you may choose to connect directly to a compute node in order to have a similar environment and restrictions as you have for your compute jobs. You could even use a debugger to interactively debug your program in an identical environment as those your jobs run in. To do so, you should follow the same instructions as above, but there are a few extra steps and details to take into account: | In addition to connecting to one of the login or interactive nodes, you may choose to connect directly to a compute node in order to have a similar environment and restrictions as you have for your compute jobs. You could even use a debugger to interactively debug your program in an identical environment as those your jobs run in. To do so, you should follow the same instructions as above, but there are a few extra steps and details to take into account: | ||
| Line 24: | Line 39: | ||
| * Connect to Hábrók to any of the login nodes as normal (via a terminal, MobaXterm, or the web portal) and submit a job to the desired node type and with the desired settings. This job should not do anything, so you can use the '' | * Connect to Hábrók to any of the login nodes as normal (via a terminal, MobaXterm, or the web portal) and submit a job to the desired node type and with the desired settings. This job should not do anything, so you can use the '' | ||
| - | | + | <code bash> |
| - | #SBATCH --time=00: | + | # |
| - | #SBATCH --partition=regular | + | #SBATCH --time=00: |
| - | #SBATCH --nodes=1 | + | #SBATCH --partition=regular |
| - | #SBATCH --cpus-per-task=4 | + | #SBATCH --nodes=1 |
| - | #SBATCH --mem=8GB | + | #SBATCH --cpus-per-task=4 |
| - | + | #SBATCH --mem=8GB | |
| - | sleep 1800 | + | |
| + | sleep 1800 | ||
| + | </ | ||
| * Once the job is running, you can find out what node has been assigned to it with '' | * Once the job is running, you can find out what node has been assigned to it with '' | ||
| * Press '' | * Press '' | ||
| * From the drop-down menu, select "+ Add New SSH Host..." | * From the drop-down menu, select "+ Add New SSH Host..." | ||
| - | * Input the '' | + | * Input the '' |
| * You will then be asked what configuration file to save the information at. Any of the suggested options should work, the '' | * You will then be asked what configuration file to save the information at. Any of the suggested options should work, the '' | ||
| * Again press '' | * Again press '' | ||