Skip to content

Latest commit

 

History

History
31 lines (18 loc) · 1.44 KB

File metadata and controls

31 lines (18 loc) · 1.44 KB

Compatibility

This Feature adds shared libraries for NVIDIA CUDA and is only useful for devcontainers that run on a host machine with an NVIDIA GPU. Within your devcontainer, use the nvidia-smi command to ensure that your GPU is available for CUDA.

If the nvidia-smi command is not available within your devcontainer, you may need to complete the following steps:

Install the NVIDIA Container Toolkit

Follow NVIDIA's instructions to install the NVIDIA Container Toolkit on your host machine. The NVIDIA Container Toolkit is available on a variety of Linux distributions. Make sure you have installed the NVIDIA driver for your Linux distribution before installing the NVIDIA Container Toolkit.

Enable GPU passthrough

Enable GPU passthrough to your devcontainer by using hostRequirements. Here's an example of a devcontainer with this property:

{
  "hostRequirements": {
    "gpu": "optional" 
  }
}

Note: Setting gpu property's value to true will work with GPU machine types, but fail with CPUs. Hence, setting it to optional works in both cases. See schema for more configuration details.

OS Support

This Feature should work on recent versions of Debian/Ubuntu-based distributions with the apt package manager installed.

bash is required to execute the install.sh script.