Skip to content

Commit fecf3f7

Browse files
committed
tweak formatting
1 parent b114f67 commit fecf3f7

File tree

1 file changed

+25
-20
lines changed

1 file changed

+25
-20
lines changed

docs/access/vscode.md

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,17 @@ There are two ways to set up the connection:
1111
The main challenge with using VSCode is that the most convenient method for starting a remote session is to start a remote tunnel from the VS Code GUI.
1212
This approach starts a session in the standard login environment on that node, however this won't work if you want to be developing in a container, in a uenv, or on a compute node.
1313

14-
This process is also demonstrated in a webinar on [Interactive computing on "Alps"](https://www.cscs.ch/publications/tutorials/2025/video-of-the-webinar-interactive-computing-on-alps). Video and slides accessible.
14+
This process is also demonstrated in a webinar on [Interactive computing on "Alps"](https://www.cscs.ch/publications/tutorials/2025/video-of-the-webinar-interactive-computing-on-alps):
15+
16+
<iframe width="100%"
17+
height="315"
18+
src="https://www.youtube.com/embed/cLVpJO_fE6I?si=bTmmsS_9QvTHpUqK&amp;start=2257"
19+
title="YouTube video player"
20+
frameborder="0"
21+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
22+
referrerpolicy="strict-origin-when-cross-origin"
23+
allowfullscreen>
24+
</iframe>
1525

1626
## Flexible method: remote server
1727

@@ -84,9 +94,9 @@ Once you have finished registering the service with GitHub, in VSCode on your PC
8494
Tunnels
8595
Sign in to tunnels registered with GitHub
8696
```
87-
97+
8898
If you have not signed in to GitHub with VS Code editor, you will be redirected to the browser to sign in.
89-
99+
90100
After signing in and authorizing VSCode, the open tunnel should be visible under REMOTES (TUNNELS/SSH) -> Tunnels.
91101

92102
### Using with uenv
@@ -129,7 +139,7 @@ If you plan to do computation using your VSCode, then you should first allocate
129139
* `-t120` requests a 2 hour (120 minute) reservation
130140
* `-n1` requests a single rank - only one rank/process is required for VSCode
131141
* `--pty` allows forwarding of terminal I/O, required to sign in to Github
132-
142+
133143
Once the job allocation is granted, you will be prompted to log into GitHub, the same as starting a session on the login node.
134144
If you don't want to use a uenv, the command is even simpler:
135145
```
@@ -145,40 +155,38 @@ If you plan to do computation using your VSCode, then you should first allocate
145155

146156
# start an interactive shell session
147157
srun -t120 -n1 --pty bash
148-
158+
149159
# set up the environment before starting the tunnel
150160
uenv start prgenv-gnu/24.11:v1 --view=default
151161
code tunnel --name=$CLUSTER_NAME-tunnel
152162
```
153-
163+
154164
* `-t120` requests a 2 hour (120 minute) reservation
155165
* `-n1` requests a single rank - only one rank/process is required for VSCode
156166
* `--pty` allows forwarding of terminal I/O, for bash to work interactively
157167

158-
159-
160168
### Using with containers
161169

162-
This will use CSCS's **[Container Engine][ref-container-engine]**. Using this workflow, one can pull a container from a registry like DockerHub. Note that this process also requires that you have a GitHub account, with an authentication and authorization step as described earlier.
170+
This will use CSCS's **[Container Engine][ref-container-engine]**.
171+
Using this workflow, one can pull a container from a registry like DockerHub.
172+
Note that this process also requires that you have a GitHub account, with an authentication and authorization step as described earlier.
163173

164174
This will also use the Remote Tunnel extension and the VS Code connected to the GitHub account (see above).
165175

166-
#### TOML File with Image and Mount Paths
167-
168-
```toml
176+
```toml title="EDF file with image and mount paths"
169177
image = "nvcr.io#nvidia/pytorch:24.01-py3" # example of PyTorch NGC image
170178
writable = true
171179
mounts = ["/paths/on/scratch/or/home:path/on/the/container",
172180
"/path/if/same/on/both"
173-
"/path/of/code/executable:/path/for/code/executable/in/container"]
181+
"/path/of/code/executable:/path/for/code/executable/in/container"]
174182
workdir = "default/working/dir/path"
175183
```
176184

177-
Ensure that the `code` executable is accessible in the container. Either it can be contained in the image, or one of the mounted folders should contain it.
178-
179-
#### Launch Container & Tunnel
185+
!!! note
186+
Ensure that the `code` executable is accessible in the container.
187+
It can either be contained in the image, or in one of the mounted folders.
180188

181-
```bash
189+
```bash title="Launch container and tunnel"
182190
# launch container on compute node
183191
srun -N 1 --environment=/absolute/path/to/tomlfile.toml --pty bash
184192

@@ -192,6 +200,3 @@ cd path/for/code/executable/in/container
192200

193201
!!! warning
194202
This approach is not recommended, because while it may be easier to connect via the VS Code UI, it is much more difficult to configure the connection so that you can use uenv, containers or compute nodes.
195-
196-
!!! todo
197-
Write the guide

0 commit comments

Comments
 (0)