VS Code

User Guide (Latest)

The VS Code built-in app lets you easily use VS Code with your AI Workbench Projects, allowing you to use its powerful coding and debugging tools within the context of your AI or data science project. This feature works both locally and remotely, giving you the flexibility to work on your project from anywhere.

  • This feature uses native VS Code on your computer to connect to the project’s running container, so you must have VS Code installed locally before you add it to a project.

By default, VS Code is set up to work with docker. If you are using Podman, you must tell VS Code to use a different command.

  1. In VS Code, open the Settings tab.

  2. Search for dev.containers.dockerPath and set it to podman.

If you are running on Windows, you must tell VS Code to execute in WSL and which WSL Distro to use.

  1. In VS Code, open the Settings tab.

  2. Search for dev.containers.executeInWSL and check the box to enable.

  3. Search for dev.containers.executeInWSLDistro and set it to NVIDIA-Workbench.

Important

If you are switching between local and remote Locations, you must change your VS Code configuration to reflect what you are trying to connect to. For example, if local is Windows, to open VS Code on a Linux VM would require unchecking dev.containers.executeInWSL

To add VS Code to a project in AI Workbench, do the following:

  1. In AI Workbench, open a project.

  2. Click Environment and then click Apps. The list of applications in the project appears.

  3. Click Add.

  4. Click Visual Studio Code. This adds VS Code to your project.

  5. (Optional) Click Launch Visual Studio Code to start working.

  • You cannot use different runtimes simultaneously, whether locally or remotely. For instance, you cannot use Docker locally and Podman remotely. The configuration for VS Code is global, meaning that it applies to all environments.

  • If you need to switch between runtimes, you need to change the settings before starting the VS Code app. This is because the configuration is global and applies to all environments.

  • Extensions installed in Project containers are not persisted. This means that they must be installed every time you start the Project container.

Previous Built-in Apps
Next JupyterLab
© Copyright © 2024, NVIDIA Corporation. Last updated on Jun 10, 2024.