GithubHelp home page GithubHelp logo

amidg / jetson-image-builder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from r7vme/xavier-base-docker-images

0.0 0.0 0.0 17 KB

Infrastructure project used to build Jetson images

License: MIT License

Shell 100.00%

jetson-image-builder's Introduction

Jetpack for NVIDIA Jetson AGX Xavier in docker

Image includes:

  • nvidia drivers
  • cuda
  • cuDNN
  • opencv
  • TensorRT

Prerequisites:

  • Flash your Xavier with Jetpack without any packages.
  • Instead download deb packages with sdkmanager and copy to root of this repo (See below).

To build:

docker build -t jetpack42 -f Dockerfile.jetpack42 .
# squashed (single layer) 1.8GB smaller. 5.21GB vs 6.93GB
# docker build --squash -t jetpack42 -f Dockerfile.jetpack42 .

To run:

docker run \
  -ti \
  --rm \
  --device /dev/nvhost-as-gpu \
  --device /dev/nvhost-ctrl \
  --device /dev/nvhost-ctrl-gpu \
  --device /dev/nvhost-ctxsw-gpu \
  --device /dev/nvhost-dbg-gpu \
  --device /dev/nvhost-gpu \
  --device /dev/nvhost-prof-gpu \
  --device /dev/nvhost-sched-gpu \
  --device /dev/nvhost-tsg-gpu \
  --device /dev/nvmap \
  --name jetpack42 \
  jetpack42 bash

How to get cuda, cuDNN and other packages required for these docker images?

Unfortunately for Jetpack 4.2 repos require authentication (developer.nvidia.com account), so in order to build docker images with cuda we need to predownload them.

The easiest way to do it with sdkmanager. If you alsready have sdkmanager running, you probably already have these packages under download directory (e.g. ~/Downloads/nvidia/sdkm_downloads).

If not either follow official instructions or use "sdkmanager on any linux" section.

sdkmanager on any linux

By default Jetpack can be installed only from Ubuntu 16.04 or 18.04. Fortunately there are multiple ways to avoid it. In my case i have Arch linux and here is what worked for me.

Download sdkmanager deb package from downloads center.

Then unpack

ar x sdkmanager_0.9.11-3405_amd64.deb
tar xf data.tar.xz

lsb-release also should fake ubuntu. This can be done by installing lsb-release package (e.g. available for Arch) and adding following config to /etc/lsb-release.

LSB_VERSION=1.4
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"

There can also be some dependencies missing, but it has no fancy dependecies, so should work on most desktop linux (e.g. in my case only lbzip2 was missing).

Finally run

./opt/nvidia/sdkmanager/sdkmanager

flashing w/o sdkmanager

It's possible to flash xavier completely w/o sdkmanager.

wget https://developer.nvidia.com/embedded/dlc/l4t-jetson-driver-package-32-1-JAX-TX2
wget https://developer.nvidia.com/embedded/dlc/l4t-sample-root-filesystem-32-1-JAX-TX2
sudo tar xpf JAX-TX2-Jetson_Linux_R32.1.0_aarch64.tbz2
cd Linux_for_Tegra/rootfs/
sudo tar xpf ../../JAX-TX2-Tegra_Linux_Sample-Root-Filesystem_R32.1.0_aarch64.tbz2
cd ..
sudo ./apply_binaries.sh
# 1. connect your xavier to USB
# 2. press and hold RECOVERY button and then press POWER button
# 3. release both buttons
# 4. lsusb should see NVIDIA device
sudo ./flash.sh jetson-xavier mmcblk0p1

jetson-image-builder's People

Contributors

r7vme avatar amidg avatar hasbegun 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.