VS Code Integration#

Overview of the VS Code Integration#
AI Workbench integrates with VS Code. The primary feature is attaching VS Code to the project container, allowing you to develop in the correct execution environment.
It works for both local and remote projects.
Note
The best way to understand the VS Code integration is through the exercises in the Onboarding Project.
Adding VS Code to a Project#
Open AI Workbench and select a project
Navigate to Environment > Project Container > Applications
Click Add
Select Visual Studio Code
Limitations of the VS Code Integration#
Extensions
- VS Code extensions installed within a project container are not automatically persisted
- You can manually persist them in the .vscode/extensions.json
file in the project repository
Global Container Runtime - The VS Code integration relies on the globally configured container runtime in VS Code (see Docker vs. Podman) - You may need to manually configure this in VS Code settings
Windows - Execution settings need to be changed between WSL and a remote location - You may need to manually configure this in VS Code settings
Note
If you are using VS Code, then it’s wise to use the same container runtime (either Docker or Podman) for AI Workbench in each of your locations.
Details for Adding VS Code#
How it works#
You need VS Code installed on your laptop before using the integration
Adding it to one project does not automatically add it to others
AI Workbench installs VS Code Server inside the project container
AI Workbench updates the spec.yaml file to include VS Code
Docker vs. Podman#
By default, VS Code is configured to work with Docker.
Using Podman requires you to manually update VS Code settings.
Steps to configure VS Code for Podman:
Go to VS Code settings
Search for
dev.containers.dockerPath
Change its value to
podman
Windows Configuration#

Windows requires you to configure VS Code to execute within WSL and specify the NVIDIA-Workbench
WSL distribution.
Steps to configure VS Code for WSL:
Go to VS Code settings
Search for
dev.containers.executeInWSL
and check the box to enableSearch for
dev.containers.executeInWSLDistro
and set it toNVIDIA-Workbench
Important
You must change this execution setting in VS Code every time you switch between local and remote environments.
For example, if you need to open VS Code on a Linux VM, you must uncheck dev.containers.executeInWSL
in VS Code settings.
FAQs#
Common questions on VS Code#
How do I get to the VS Code settings?#
File > Preferences > Settings opens the settings tab. You can use the search bar to find the settings you need.
Can I use other IDEs besides VS Code and JupyterLab?#
Yes. A Workbench project is a git repository of files, so you can use any IDE that you want.
However, for IDEs besides VS Code and JupyterLab, you must manually configure remote SSH connections and attaching to the project container
We will be expanding direct integration support. You can check status in the table of IDEs
Can I use the CLI to add and configure VS Code?#
Yes. The CLI has the same functionality as the Desktop App.