【问题标题】:Image's rootfs is incomplete while building from Dockerfile从 Dockerfile 构建时,图像的 rootfs 不完整
【发布时间】:2021-03-12 16:10:32
【问题描述】:

我正在从一个 Dokerfile 为 Jetson 构建一个图像。以下是其中的摘录:

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

ls 命令只返回几个文件。然而,当我运行生成的容器并使用它的 shell 时,这个目录包含更多的文件。

问题是我需要该文件夹中的一些库来安装某些东西。我希望能够从 Dockerfile 安装它,但只能从容器的 shell 中安装。

为什么目录不完整,有没有办法强制构建它以便在我需要时准备好它?

谢谢。

【问题讨论】:

    标签: docker dockerfile arm64 nvidia-jetson


    【解决方案1】:

    通过将"default-runtime": "nvidia" 添加到/etc/docker/daemon.json 来解决它。更多细节在这里:https://github.com/dusty-nv/jetson-containers#docker-default-runtime

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-02-08
      • 2023-03-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多