Setting up a Docker GPU Environment

Set up a GPU environment if you are building a model with image or video data

Prerequisites

  • Ensure your OS has one or more CUDA-capable GPUs

  • The iai client uses PyTorch with CUDA 11.3. Ensure you install a driver version >= 11.3. Install the latest driver available. For more information, see: CUDA major component versions.

Linux/macOS Setup

  1. Install CUDA driver or CUDA toolkit:

  2. Install NVidia container toolkit:

    • Ensure nvidia-docker2 can modify the docker configuration file /etc/docker/daemon.json

Windows Setup

  1. Ensure that intel VT-x or AMD SVM is enabled in BIOS, check the motherboard manufacture document for exact steps.

  2. Install CUDA driver or CUDA toolkit:

    • Install cuda toolkit (which include driver, but also contains other unnecessary components)

      • In the component selection screen, you can choose to install only the CUDA driver

    • Install CUDA driver only

      • Go to Nvidia driver page, select the corresponding graphic card and operating system, download and install the driver.

Running Docker Container with GPU device

Add --gpus all option to the docker run command.

Example:

docker run --gpus all -it -d --name $SILO_NAME -v <data_path>:/root/demo 919740802015.dkr.ecr.ca-central-1.amazonaws.com/edge/fl-client:latest

Last updated