You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/access/vscode.md
+25-20Lines changed: 25 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,17 @@ There are two ways to set up the connection:
11
11
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.
12
12
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.
13
13
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):
@@ -84,9 +94,9 @@ Once you have finished registering the service with GitHub, in VSCode on your PC
84
94
Tunnels
85
95
Sign in to tunnels registered with GitHub
86
96
```
87
-
97
+
88
98
If you have not signed in to GitHub with VS Code editor, you will be redirected to the browser to sign in.
89
-
99
+
90
100
After signing in and authorizing VSCode, the open tunnel should be visible under REMOTES (TUNNELS/SSH) -> Tunnels.
91
101
92
102
### Using with uenv
@@ -129,7 +139,7 @@ If you plan to do computation using your VSCode, then you should first allocate
129
139
* `-t120` requests a 2 hour (120 minute) reservation
130
140
* `-n1` requests a single rank - only one rank/process is required for VSCode
131
141
* `--pty` allows forwarding of terminal I/O, required to sign in to Github
132
-
142
+
133
143
Once the job allocation is granted, you will be prompted to log into GitHub, the same as starting a session on the login node.
134
144
If you don't want to use a uenv, the command is even simpler:
135
145
```
@@ -145,40 +155,38 @@ If you plan to do computation using your VSCode, then you should first allocate
145
155
146
156
# start an interactive shell session
147
157
srun -t120 -n1 --pty bash
148
-
158
+
149
159
# set up the environment before starting the tunnel
150
160
uenv start prgenv-gnu/24.11:v1 --view=default
151
161
code tunnel --name=$CLUSTER_NAME-tunnel
152
162
```
153
-
163
+
154
164
* `-t120` requests a 2 hour (120 minute) reservation
155
165
* `-n1` requests a single rank - only one rank/process is required for VSCode
156
166
* `--pty` allows forwarding of terminal I/O, for bash to work interactively
157
167
158
-
159
-
160
168
### Using with containers
161
169
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.
163
173
164
174
This will also use the Remote Tunnel extension and the VS Code connected to the GitHub account (see above).
165
175
166
-
#### TOML File with Image and Mount Paths
167
-
168
-
```toml
176
+
```toml title="EDF file with image and mount paths"
169
177
image = "nvcr.io#nvidia/pytorch:24.01-py3"# example of PyTorch NGC image
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.
@@ -192,6 +200,3 @@ cd path/for/code/executable/in/container
192
200
193
201
!!! warning
194
202
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.
0 commit comments