Skip to main content

VSCode

VSCode on the server

  • Navigate to Launcher tab
  • Select VS Code

Connecting local VSCode to the hub

With the JupyterHub extension, you can connect local VSCode to Jupyter Notebook remote kernels. Your notebook files are saved locally on your machine, but you can still access the remote files such as home directory /home/jovyan and dataset directory /home/jovyan/userdata/{username}. However, if you want to upload files to the Notebook server, you need to use JupyterHub on the web.

How to setup VSCode and JupyterHub

  • Download and install VSCode

  • Install JupyterHub VSCode extension. Click on the extensions on the sidebar (Or View > Extensions) , search for JupyterHub, then click on the blue install button

    JupyterHub Extension
  • Generate token a2s-cluster.inf.h-brs.de/hub/token

    JupyterHub Token
  • Set environment variable export NODE_TLS_REJECT_UNAUTHORIZED=0 in .bashrc or zshrc. This is required for self-signed JupyterHub server.

  • Open Terminal and run VSCode code from there

    info

    Note that you have to run VSCode via terminal unless you set the variable NODE_TLS_REJECT_UNAUTHORIZED=0 globally

  • Open and existing notebook or create a notebook file by opening the Command Palette (Ctrl+Shift+P) and select Jupyter: Create New Jupyter Notebook

  • Open the kernel picker by clicking on the kernel picker in the top right of the notebook or by invoking the Notebook: Select Notebook Kernel command

  • Select the option Existing JupyterHub Server

  • Follow the prompts to enter the url of the JupyterHub Server https://a2s-cluster.inf.h-brs.de, LDAP username i.e. mmuste2s and the generated token above

  • Select a kernel e.g. Python and run your notebook

VSCode Remote Kernel