Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
pvettenr@turso03$USER@turso03:~$ srun --interactive -M vorna --pty bash
srun: job 70875278 queued and waiting for resources
srun: job 70875278 has been allocated resources
pvettenr@vorna-517$USER@HOSTNAME:~$
  • Load module code-server to get access to Visual Studio Code Server
Code Block
pvettenr@vorna-517$USER@$HOSTNAME:~$ module load code-server
  • create configuration for the Visual Studio code server. Configuration is located in a file: ~/.config/code-server/config.yaml. The file is generated when you run the code-server first time
Code Block
pvettenr@vorna-517$USER@$HOSTNAME:~$ code-server
[2022-01-26T13:35:45.511Z] info  Wrote default config file to ~/.config/code-server/config.yaml
[2022-01-26T13:35:46.142Z] info  code-server 3.7.3 93fb76e4a71b1959ec2a23481ba2611200d714b2
[2022-01-26T13:35:46.144Z] info  Using user-data-dir ~/.local/share/code-server
[2022-01-26T13:35:46.161Z] info  Using config file ~/.config/code-server/config.yaml
[2022-01-26T13:35:46.162Z] info  HTTP server listening on http://127.0.0.1:8080
[2022-01-26T13:35:46.162Z] info    - Authentication is enabled
[2022-01-26T13:35:46.162Z] info      - Using password from ~/.config/code-server/config.yaml
[2022-01-26T13:35:46.162Z] info    - Not serving HTTPS
^C

...

  • start code-server, You might want to start the code server with resources you reserved for the interactive session. If you run it this way it uses only one cpu and default memory. Please read more from HPC Environment User Guide#4.2InteractiveSessions
Code Block
pvettenr@vorna-517$USER@$HOSTNAME:~$ code-server
[2022-01-26T13:47:35.423Z] info  code-server 3.7.3 93fb76e4a71b1959ec2a23481ba2611200d714b2
[2022-01-26T13:47:35.423Z] info  Using user-data-dir ~/.local/share/code-server
[2022-01-26T13:47:35.432Z] info  Using config file ~/.config/code-server/config.yaml
[2022-01-26T13:47:35.432Z] info  HTTP server listening on http://0.0.0.0:8992
[2022-01-26T13:47:35.432Z] info    - Authentication is enabled
[2022-01-26T13:47:35.432Z] info      - Using password from ~/.config/code-server/config.yaml
[2022-01-26T13:47:35.432Z] info    - Not serving HTTPS
  • start browser and connect that browser to the host you started the interactive session and port you configured. In this example the right URL is this: http://vorna-517$HOSTNAME.local.cs.helsinki.fi:8992


  • insert the password from your configuration file and you are running Visual Studio Code in the compute node inside of interactive session on a browser

...