Videos
» pip install jupyter-code-server
this is possible and requires the following steps:
Installation of Code-server
To connect to the server using VS Code, Code-server must be installed on the DSWS for the user according to this guide. Write your own username instead of [username].
curl -fsSL https://code-server.dev/install.sh | sh
sudo systemctl start code-server@[username]
sudo systemctl enable --now code-server@[username]
Setup VS Code
Make sure your VS Code is up-to-date. Open a new window in your local VS Code and install the following Extensions:
Python
Jupyter
Remote — SSH
Connect the VS Code to the Host
Click on the >< — Symbol (“Open a Remote Window”) in the bottom left and select in the top bar “Connect Current Window to host”. Connect to the remote machine via SSH, using your username and IP address. Note messages popping up in VS Code’s UI, you have to enter the remote OS, a keyfile, or your password.
Now open a respective directory in which you want to develop. Therefore, open the Explorer, “Open Folder” and specify a directory on the remote machine. Then confirm with your password and that you are trusting the code.
Connect to the Kernel
Connect to a remote Kernel in Docker Create a new Juypter Notebook or create a new one. Then run a cell using [Shift]+[Enter] and note a message in the top bar approaches. Select “Existing Jupyter Server” and “Enter the URL of the running Jupyter Server”.
Then you have to specify the remote kernel you want to connect with. Therefore provide the URL as you would open it in a browser, containing the hostname (or IP-address), the exposed port, and the token of the Jupyter server. The token can be extracted in a VS Code Terminal (as we are already connected per SSH) or in an additional Terminal on the remote machine. Use the command jupyter server list or if it runs in docker docker exec -it [ service_name | UID] jupyter server list to extract the token.
Finally, select “Python 3” or whatever kernel you want and start computing. Of course, the same works for standard Python files.
Now you should run all Jupyter Notebooks and Python Files!
Disclaimer: Note that this instruction is from this tutorial on Connect your remote GPU-Jupyter to your local VS Code — A great Deep Learning Solution which additionally provides screenshots.
Not sure whether this is the most elegant solution, but you can do that with VSCode extension: Remote - SSH.
Once you have that installed. To connect to your server and files open Command Palette via Ctrl + Shift + P and run Remote-SSH: Connect to Host... command.
It will open new window of VSCode connected to the server, and you should see your files through Explorer on the side panel.


