Git Product home page Git Product logo

jetson-containers's Introduction

Machine Learning Containers for Jetson and JetPack

Hosted on NVIDIA GPU Cloud (NGC) are the following Docker container images for machine learning on Jetson:

Dockerfiles are also provided for the following containers, which can be built for JetPack 4.4 or newer:

  • ROS Melodic (ros:melodic-ros-base-l4t-r32.4.4)
  • ROS Noetic (ros:noetic-ros-base-l4t-r32.4.4)
  • ROS2 Eloquent (ros:eloquent-ros-base-l4t-r32.4.4)
  • ROS2 Foxy (ros:foxy-ros-base-l4t-r32.4.4)

Below are the instructions to build and test the containers using the included Dockerfiles.

Docker Default Runtime

To enable access to the CUDA compiler (nvcc) during docker build operations, add "default-runtime": "nvidia" to your /etc/docker/daemon.json configuration file before attempting to build the containers:

{
    "runtimes": {
        "nvidia": {
            "path": "nvidia-container-runtime",
            "runtimeArgs": []
        }
    },

    "default-runtime": "nvidia"
}

You will then want to restart the Docker service or reboot your system before proceeding.

Building the Containers

To rebuild the containers from a Jetson device running JetPack 4.4 or newer, first clone this repo:

$ git clone https://github.com/dusty-nv/jetson-containers
$ cd jetson-containers

ML Containers

To build the ML containers (l4t-pytorch, l4t-tensorflow, l4t-ml), use scripts/docker_build_ml.sh - along with an optional argument of which container(s) to build:

$ ./scripts/docker_build_ml.sh all        # build all: l4t-pytorch, l4t-tensorflow, and l4t-ml
$ ./scripts/docker_build_ml.sh pytorch    # build only l4t-pytorch
$ ./scripts/docker_build_ml.sh tensorflow # build only l4t-tensorflow

You have to build l4t-pytorch and l4t-tensorflow to build l4t-ml, because it uses those base containers in the multi-stage build.

Note that the TensorFlow and PyTorch pip wheel installers for aarch64 are automatically downloaded in the Dockerfiles from the Jetson Zoo.

ROS Containers

To build the ROS containers, use scripts/docker_build_ros.sh with the name of the ROS distro to build:

$ ./scripts/docker_build_ros.sh all       # build all: melodic, noetic, eloquent, foxy
$ ./scripts/docker_build_ros.sh melodic   # build only melodic
$ ./scripts/docker_build_ros.sh noetic    # build only noetic
$ ./scripts/docker_build_ros.sh eloquent  # build only eloquent
$ ./scripts/docker_build_ros.sh foxy      # build only foxy

Note that ROS Noetic and ROS2 Foxy are built from source for Ubuntu 18.04, while ROS Melodic and ROS2 Eloquent are installed from Debian packages into the containers.

Testing the Containers

To run a series of automated tests on the packages installed in the containers, run the following from your jetson-containers directory:

$ ./scripts/docker_test_ml.sh all        # test all: l4t-pytorch, l4t-tensorflow, and l4t-ml
$ ./scripts/docker_test_ml.sh pytorch    # test only l4t-pytorch
$ ./scripts/docker_test_ml.sh tensorflow # test only l4t-tensorflow

To test ROS:

$ ./scripts/docker_test_ros.sh all       # build all: melodic, noetic, eloquent, foxy
$ ./scripts/docker_test_ros.sh melodic   # build only melodic
$ ./scripts/docker_test_ros.sh noetic    # build only noetic
$ ./scripts/docker_test_ros.sh eloquent  # build only eloquent
$ ./scripts/docker_test_ros.sh foxy      # build only foxy

jetson-containers's People

Contributors

dusty-nv avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.