VS Code

The VS Code built-in app lets you easily use VS Code with your AI Workbench Projects. To add VS Code to a project in AI Workbench, follow these steps:

  1. Navigate to the “Apps” section of the environment tab.

  2. Click the “add” button.

  3. Select Visual Studio Code from the list of available apps.

  4. This will add VS Code to your project, allowing you to use its powerful coding and debugging tools within the context of your AI or data science project.

Note that this feature uses native VS Code on your computer to connect to the project’s running container, so you’ll need to have VS Code installed locally before attempting to add it to a project.

Also, this feature works both locally and remotely, giving you the flexibility to work on your project from anywhere.

AI Workbench now integrates with VS Code! While this integration is still in its early stages, it’s designed to make your development experience more seamless and efficient.

To get started, in some cases, you’ll need to perform a one-time configuration based on your setup. Open the Settings tab in VS Code and search for the fields indicated in the sections below.

Podman

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. Open the Settings tab in VS Code

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

Windows

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

  1. Open the Settings tab in VS Code

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

  3. Search for dev.containers.executeInWSLDistro and set 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

  • It’s important to note that 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’ll need to change the settings before starting the VS Code app. This is because the configuration is global and applies to all environments.

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

AI Workbench says VS Code failed to start, but the window ended up loading OK

Sometimes it can take a long time for VS Code to install and set up inside the project container. Try opening the VS Code app again. To avoid having AI Workbench automatically shut down the container when VS Code fails to start, start another app like JupyterLab first.

VS Code fails to find or connect to the container

You most likely need additional manual configuration as explained in the Additional Manual Configuration section above.

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