LogoLogo
  • TABLE OF CONTENTS
  • General Concepts
    • Overview
    • Introduction to Rendered.ai
    • The Rendered.ai Platform
    • Who Uses Rendered.ai?
    • Rendered.ai Licensing and Offerings
  • Application User Guides
    • Overview
    • Quick Start Guide
      • Terminology
      • Content Codes
      • Getting Started with the SDK
    • Tutorials
      • Organization and Workspace Resources
      • Creating and Using Graphs
        • Graph Validation
        • Graph Best Practices
      • Creating and Using Datasets
        • Dataset Annotations
        • Dataset Analytics
        • Domain Adaptation
        • Dataset Comparison
        • Training and Inference
        • Mixing Datasets
        • Dataset Best Practices
      • Creating and Using Volumes
        • Inpaint Service
      • Collaboration
  • Development Guides
    • Overview
    • Ana Software Architecture
      • Basic components
      • Graphs
      • Channels
      • Packages
      • Package Volumes
      • Nodes
      • Schema
      • Ana Modules, Classes, and Functions
      • The anatools Package
      • Graph Validation
        • Typical Validation Use Cases
      • Preview
      • In-tool Help
    • Setting Up the Development Environment
      • Local Development With NVIDIA GPUs
      • Remote Development With AWS EC2
    • Deploying a Channel
    • An Example Channel - Toybox
      • Run and Deploy the Toybox Channel
      • Add a Modifier Node
      • Add a Generator Node
  • Open Source Channels
    • Toybox
    • DIRSIG Channel
  • Release Notes
    • Rendered.ai Platform
      • Platform Version 1.6.0
      • Platform Version 1.5.0
      • Platform Version 1.4.1
      • Platform Version 1.4.0
      • Platform Version 1.3.2
      • Platform Version 1.3.1
      • Platform Version 1.3.0
      • Platform Version 1.2.6
      • Platform Version 1.2.5
      • Platform Version 1.2.4
      • Platform Version 1.2.3
      • Platform Version 1.2.2
      • Platform Version 1.2.1
      • Platform Version 1.2.0
      • Platform Version 1.1.5
      • Platform Version 1.1.4
      • Platform Version 1.1.3
      • Platform Version 1.1.2
      • Platform Version 1.1.1
      • Platform Version 1.1.0
      • Platform Version 1.0.3
      • Platform Version 1.0.2
      • Platform Version 1.0.1
      • Platform Version 1.0.0
      • Platform Version 0.3.4.4
      • Platform Version 0.3.4.3
      • Platform Version 0.3.4.2
      • Platform Version 0.3.4.1
      • Platform Version 0.3.4
      • Platform Version 0.3.3.1
      • Platform Version 0.3.3
      • Platform Version 0.3.2.2
      • Platform Version 0.3.2.1
      • Platform Version 0.3.2
      • Platform Version 0.3.1.6
      • Platform Version 0.3.1.5
      • Platform Version 0.3.1.4
      • Platform Version 0.3.1.3
      • Platform Version 0.3.1.2
      • Platform Version 0.3.1
      • Platform Version 0.3.0.9
      • Platform Version 0.3.0.8
      • Platform Version 0.3.0.7
      • Platform Version 0.3.0.6
      • Platform Version 0.3.0.5
      • Platform Version 0.3.0
      • Platform Version 0.2.15
      • Platform Version 0.2.14
      • Platform Version 0.2.13
      • Platform Version 0.2.12
      • Platform Version 0.2.11
      • Platform Version 0.2.10
      • Platform Version 0.2.9
      • Platform Version 0.2.8
      • Platform Version 0.2.7
      • Platform Version 0.2.6
      • Platform Version 0.2.5
      • Platform Version 0.2.4
      • Platform Version 0.2.3
      • Platform Version 0.2.2
      • Platform Version 0.2.1
      • Platform Version 0.2.0
Powered by GitBook
On this page
  • NVIDIA Container Toolkit
  • VSCode Development Container
Export as PDF
  1. Development Guides
  2. Setting Up the Development Environment

Local Development With NVIDIA GPUs

PreviousSetting Up the Development EnvironmentNextRemote Development With AWS EC2

Last updated 7 months ago

Rendering images can be accelerated with GPU compute. In the Rendered.ai cloud platform, we use GPU compute on deployed channels to improve channel runtimes. Linux developers who have a NVIDIA GPU on their local machine can use the GPU when developing their channels by installing the NVIDIA Container toolkit and configuring a devcontainer.json file in the codebase. Windows users will only need to configure the devcontainer.json file in the codebase.

NVIDIA Container Toolkit

The NVIDIA Container Toolkit allows users to build and run GPU accelerated Docker containers. More information about the library can be found at .

To install the toolkit you’ll need to first install the NVIDIA driver and Docker engine for your Linux distribution. To install the NVIDIA Container Toolkit, follow the instructions at .

After installing the NVIDIA Container Toolkit we should be able to test whether Docker has access to your GPU with the following command. This will download an officially supported NVIDIA Docker image and run the 'nvidia-smi' command to query the device.

Command

docker run --rm --gpus all nvidia/cuda:11.0.3-base-ubuntu20.04 nvidia-smi

Example Output

test@test ~ % docker run --rm --gpus all nvidia/cuda:11.0.3-base-ubuntu20.04 nvidia-smi
Unable to find image 'nvidia/cuda:11.0.3-base-ubuntu20.04' locally
11.0.3-base-ubuntu20.04: Pulling from nvidia/cuda
d5fd17ec1767: Already exists 
ea7643e57386: Pull complete 
622a04926279: Pull complete 
18fcb7509e42: Pull complete 
21e5db7c1fa2: Pull complete 
Digest: sha256:1db9418b1c9070cdcbd2d0d9980b52bd5cd20216265405fdb7e089c7ff96a494
Status: Downloaded newer image for nvidia/cuda:11.0.3-base-ubuntu20.04
Wed Jun  8 16:26:02 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.129.06   Driver Version: 470.129.06   CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:09:00.0  On |                  N/A |
|  0%   41C    P8    12W / 180W |    514MiB /  8116MiB |     10%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+

Next we will configure our VSCode Dev Container startup instructions to use the GPU.

VSCode Development Container

VSCode Development Containers use a devcontainer.json configuration file to instruct VSCode how to startup and run the Docker container. In the devcontainer.json file, we need to modify the runArgs list to include the “--gpus all“ part of our command above. Take a look at the example below:

"runArgs": ["--network","host","-v","/var/run/docker.sock:/var/run/docker.sock", "--privileged=true","--gpus","all"],

After we have the change, we can start or restart the Developer Container. In VSCode, press F1 to bring up the command palette then select Remote-Containers: Rebuild and Reopen in Container. We can then test that our Developer Container has access to the GPU by running the nvidia-smi command from a terminal within the container.

(anatools) anadev@test:/workspaces/example$ nvidia-smi
Wed Jun  8 18:06:36 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.129.06   Driver Version: 470.129.06   CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:09:00.0  On |                  N/A |
|  0%   45C    P8    12W / 180W |    575MiB /  8116MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+
(anatools) anadev@test:/workspaces/example$ 
NVIDIA/nvidia-docker
Installing the NVIDIA Container Toolkit — NVIDIA Container Toolkit 1.14.5 documentation
NVIDIA Container Toolkit
VSCode Development Container