Gpu Terminal

GPU terminal

Features

The GPU terminal has the following features:

  • private virtuale machine (with Incus containers)
  • web accessible terminal
  • python development with NVIDIA GPU support
  • VS code remote tunnel support
  • easy transfer files to virtual machine

URL

The sysadmin will provide you with a link, as well as the credentials for connecting. Once you open the terminal, you will have full access to an Debian Trixie with sudo. You can install any terminal based development programs e.g. editors, anaconda, miniconda, pyenv, uv, pytorch…

One special case is development with VS Code through a remote tunnel.

VS code remote tunnel

Start a Code tunnel

First make sure you have the latest version:

code update

then type:

code tunnel

Select the way you want to authenticate, you have the choice of using your (university) Microsoft account or external Github account. image You will be presented with a URL and a code. Open the URL in your browser and fill in the code. image

Although some people get a successful sign-in from Microsoft, however a message s presented that they don’t have access! It seems you have to opt-in for a device code authentication here: https://dictselfservice.ugent.be/index.php?page=requestform&form=deviceCodeAuth. Reports are that authenticate through Github works without the opt-in. If you want to retry erase your .vscode directory (rm -rf .vscode) first.

You should see this succesfull login: image

Sign in

You can open the remote tunnel icon. image

If you didn’t login into your Microsoft or Github account in the VS code editor itself, you will first have to sign in. Tick the account icon on the left and select sign in with your Microsoft or Github account. image

Connect

A tunnel will appear with the name of your virtual machine. You can connect using the current window, or you could make a new window. image

Work

Once connected, you can use your remote machine as if it’s local. You can open files on the virtual machine, open a terminal with View -> Terminal and start working in VS code. image

Transfer files

You can add a Git repository and if you have datasets to download you can use wget or curl. However, if you want to transfer files between your desktop and the virtual machine, you can follow the next steps.

Open View -> Terminal in VS Code, you will see a menu Ports. image

Tick Forward a port, and fill in 8080 as the port. image If you hover over the provided Microsoft URL, you can open the link in your browser. A login dialog will be presented (make sure to select WebClient) and you can fill in lab (ubuntu on older terminals) twice to login. You can upload or download files and folders through this GUI interface from your local desktop.

Disconnect

If you want to disconnect from the virtual machine, tick the left botton icon. In the dialog you will find Close Remote Connection image

It could be you get a disconnect timeout in your browser after some time. You can run the code tunnel command (or any other command) in a tmux session.

Open code tunnel in tmux

Instead of running the command directly in the web terminal you can attach it in a virtual tmux terminal. This way when the web terminal closes, your running program is not cancelled, type:

tmux

Inside type:

code tunnel

(D)isconnect tmux

type ctrl-B d. The virtual terminal stops, you can exit the web terminal.

Reattach

type:

tmux attach

You will see your previous continued command reappear.