Quick deploy: Setup Matlab using image from NGC

Here we will run a job using the Matlab image from ngc and connect to it in our webbrowser. This image have two ports that are interesting to expose:

  • 5901 for VNC connections

  • 6080 for webbrowser

In this tutorial we will expose 6080 on the container a running job, and connect to it using a private connection that only our user has access to. To do this go to the Jobs page and enter the following parameters:

  • Job label: Our matlab job

  • Number of GPUs: 1

  • Time: 60

  • Image: partners/matlab:r2021a

  • Ports: 6080

matlab-job

Hit the “Queue Job” button and wait for the job to start.

After the job has start click on its entry in the “Queue & Jobs history” table to bring up the job information. From here you can see the port in the table, but the port has not yet been opened. To open it click on the three dots in the “Actions” column and select “Open private”.

private-port

This will open the port for the current user only and provide an address to access it in the table. NOTE that this uses cookies for authentication, so if your webbrowser is rejecting the cookies this method will not work. In that case you can use a public port and set the IP-filter to only allow traffic from your address.

port-address

Clicking on the address will take you a webpage that is hosted inside the container.

matlab-gui

To open matlab you can click on the matlab icon up in top right. You will need a matlab account which I do not have :( So instead I just fire up a terminal and watch star wars.

star-wars