-
Notifications
You must be signed in to change notification settings - Fork 41
connect to vscode using a container #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
fe3637d
94d1a31
b114f67
fecf3f7
2c08681
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -48,7 +48,7 @@ After downloading, copy the `code` executable to a location in your PATH, so tha | |||||||||
| export PATH=$HOME/.local/$(uname -m)/bin:$PATH | ||||||||||
| ``` | ||||||||||
| The `uname -m` command will print `aarch64` or `x86_64`, according to the microarchitecture of the node it is run on. | ||||||||||
|
|
||||||||||
| Then create the path, and copy the `code` executable to the architecture-specific path: | ||||||||||
| ``` | ||||||||||
| mkdir -p $HOME/.local/$(uname -m)/bin | ||||||||||
|
|
@@ -82,9 +82,9 @@ Once you have finished registering the service with GitHub, in VSCode on your PC | |||||||||
| Tunnels | ||||||||||
| Sign in to tunnels registered with GitHub | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| If you have not signed in to GitHub with VS Code editor, you will be redirected to the browser to sign in. | ||||||||||
|
|
||||||||||
| After signing in and authorizing VSCode, the open tunnel should be visible under REMOTES (TUNNELS/SSH) -> Tunnels. | ||||||||||
|
|
||||||||||
| ### Using with uenv | ||||||||||
|
|
@@ -112,11 +112,6 @@ Once the tunnel is configured, you can access it from VSCode. | |||||||||
| If you plan to do any intensive work: repeated compilation of large projects or running python code in Jupyter, please see the guide to running on a compute node below. | ||||||||||
| Running intensive workloads on login nodes, which are shared resources between all users, is against CSCS [fair usage][ref-policies-fair-use] of Shared Resources policy. | ||||||||||
|
|
||||||||||
| ### Using with containers | ||||||||||
|
|
||||||||||
| !!! todo | ||||||||||
| write a guide | ||||||||||
|
|
||||||||||
| ### Running on a compute node | ||||||||||
|
|
||||||||||
| If you plan to do computation using your VSCode, then you should first allocate resources on a compute node and set up your environment there. | ||||||||||
|
|
@@ -132,7 +127,7 @@ If you plan to do computation using your VSCode, then you should first allocate | |||||||||
| * `-t120` requests a 2 hour (120 minute) reservation | ||||||||||
| * `-n1` requests a single rank - only one rank/process is required for VSCode | ||||||||||
| * `--pty` allows forwarding of terminal I/O, required to sign in to Github | ||||||||||
|
|
||||||||||
| Once the job allocation is granted, you will be prompted to log into GitHub, the same as starting a session on the login node. | ||||||||||
| If you don't want to use a uenv, the command is even simpler: | ||||||||||
| ``` | ||||||||||
|
|
@@ -148,16 +143,46 @@ If you plan to do computation using your VSCode, then you should first allocate | |||||||||
|
|
||||||||||
| # start an interactive shell session | ||||||||||
| srun -t120 -n1 --pty bash | ||||||||||
|
|
||||||||||
| # set up the environment before starting the tunnel | ||||||||||
| uenv start prgenv-gnu/24.11:v1 --view=default | ||||||||||
| code tunnel --name=$CLUSTER_NAME-tunnel | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| * `-t120` requests a 2 hour (120 minute) reservation | ||||||||||
| * `-n1` requests a single rank - only one rank/process is required for VSCode | ||||||||||
| * `--pty` allows forwarding of terminal I/O, for bash to work interactively | ||||||||||
|
|
||||||||||
|
|
||||||||||
|
|
||||||||||
| ### Using with containers | ||||||||||
|
|
||||||||||
| This will use CSCS's custom **Container Engine** which can easily pull a container from a registry like DockerHub. Same setup process as earlier with GitHub. | ||||||||||
|
||||||||||
| This will use CSCS's custom **Container Engine** which can easily pull a container from a registry like DockerHub. Same setup process as earlier with GitHub. | |
| This uses [Container Engine][ref-container-engine]. | |
| First, use the same setup process as earlier with GitHub. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also "Same setup process as earlier with GitHub" is a bit vague.
Maybe something like "Note that this process also requires that you have a GitHub account, and that VS Code on your laptop has been connected to it (see above)."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is implicit that the VS Code executable is either
- already in the container image
- in a path that has been mounted in the image
Can you add some information about how to do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove whitespace that was introduced on these lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done