VS Code with GPU Resources

The VS Code Server interactive app allows you to launch a VS Code Server within a batch job on a compute node.

  1. Log In to HAL OnDemand.

  2. In the Interactive Apps menu, select VS Code Server.

  3. Fill out the form and then click Launch.

    VS Code Server Interactive App launch form.
  4. Wait for 1-2 minutes. When the status changes to Running, click Connect to VS Code.

    VS Code Server Interactive Session. When the status changes to Running, the Connect to VS code button becomes available.
  5. In your VS Code instance, open a terminal session from the Terminal menu, New Terminal.

    VS Code terminal menu with the new terminal option highlighted.
  6. Log in to the login node hal-login2.

    1. In the terminal, run:

      ssh hal-login2
      
    2. When prompted, enter your NCSA password.

    3. Complete the Duo two-factor authentication.

      VS Code terminal with the ssh command entered.
  7. To request GPU resources, run:

    swrun -p gpux1
    

    To load the python module, run:

    module load opence
    
    VS Code terminal with the srun command entered.