Search code examples
dockerdockerfilearm64nvidia-jetson

Image's rootfs is incomplete while building from Dockerfile


I'm building an image for Jetson from a Dokerfile. Here's an excerpt from it:

FROM nvcr.io/nvidia/l4t-pytorch:r32.4.4-pth1.6-py3

# some installation
RUN ls -l /usr/local/cuda-10.2/targets/aarch64-linux/lib/
# more installation

The ls command returns just a couple of files. However when I run the resulting container and use its shell, this directory contains many more files.

The problem is that I need some of the libraries from that folder to install something. I want to be able to install it from the Dockerfile but only can do so from the container's shell.

Why is the directory incomplete and is there a way to force-build it so it's ready when I need it?

Thanks.


Solution

  • Solved it by adding "default-runtime": "nvidia" to /etc/docker/daemon.json. Further details here: https://github.com/dusty-nv/jetson-containers#docker-default-runtime