Jetson AGX xavier docker build fail

Hello.
Currently, I can’t solve the error in the “apt-get update” part of the docker build at Jetson AGX xavier, so I leave this question.

My jetpack and other specifications are as follows.

NVIDIA Jetson AGX Xavier [16GB]
L4T 32.5.1 [ JetPack 4.5.1 ]
Ubuntu 18.04.5 LTS
Kernel Version: 4.9.201-tegra
Xlib: extension “NV-GLX” missing on display “localhost:10.0”.
Xlib: extension “NV-GLX” missing on display “localhost:10.0”.
Xlib: extension “NV-GLX” missing on display “localhost:10.0”.
CUDA 10.2.89
CUDA Architecture: 7.2
OpenCV version: 4.1.1
OpenCV Cuda: NO
CUDNN: 8.0.0.180
TensorRT: 7.1.3.0
Vision Works: 1.6.0.501
VPI: ii libnvvpi1 1.0.15 arm64 NVIDIA Vision Programming Interface library
Vulcan: 1.2.70

Also, the content you want to build is yolactedge.
https://github.com/haotian-liu/yolact_edge/blob/master/docker/Dockerfile.xavier
Build modifications l4t-pytorch:r32.5.0
The following build was carried out.
docker build --build-arg USER_ID=$UID -t yolact_edge_image -f Dockerfile.xavier .

The error contents are as follows:

Step 1/19 : ARG L4T_IMAGE=nvcr.io/nvidia/l4t-pytorch:r32.5.0-pth1.6-py3
Step 2/19 : ARG JETSON_PLATFORM=t194
Step 3/19 : FROM ${L4T_IMAGE}
—> ed3ca4e9cf86
Step 4/19 : ARG L4T_IMAGE
—> Using cache
—> f5340ee7aedd
Step 5/19 : ARG JETSON_PLATFORM
—> Using cache
—> 24d088850cf4
Step 6/19 : ENV DEBIAN_FRONTEND=noninteractive
—> Using cache
—> 412710989762
Step 7/19 : RUN apt-get update && apt-get install --no-install-recommends -y gnupg2 curl ca-certificates && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/*
—> Running in bb25aa8d9198
Err:1 http://ports.ubuntu.com/ubuntu-ports bionic InRelease
Temporary failure resolving ‘ports.ubuntu.com
Err:2 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease
Temporary failure resolving ‘ports.ubuntu.com
Err:3 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease
Temporary failure resolving ‘ports.ubuntu.com
Err:4 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease
Temporary failure resolving ‘ports.ubuntu.com
Reading package lists…
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic/InRelease Temporary failure resolving ‘ports.ubuntu.com
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/InRelease Temporary failure resolving ‘ports.ubuntu.com
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-backports/InRelease Temporary failure resolving ‘ports.ubuntu.com
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-security/InRelease Temporary failure resolving ‘ports.ubuntu.com
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists…
Building dependency tree…
Reading state information…
Package gnupg2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
gpgv

Package curl is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘gnupg2’ has no installation candidate
E: Package ‘curl’ has no installation candidate
The command ‘/bin/sh -c apt-get update && apt-get install --no-install-recommends -y gnupg2 curl ca-certificates && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/*’ returned a non-zero code: 100

How can we solve this?

Hi,

This looks like a DNS issue.
Does the apt update work outside of the docker?

Thanks.

Thank you very much for your reply.
As you told me, I entered the ‘apt update’-> ‘sudo apt update’ outside the docker and performed the same build after the update.
The error still occurred in the same place.
Is there any other way to do it?

Hi,

Could you try to launch the container manually and try the apt update?
For example

$ sudo docker run -it --rm --runtime nvidia --network host nvcr.io/nvidia/l4t-pytorch:r32.5.0-pth1.6-py3
root@nvidia:/# apt update

Thanks.

Based on what you told me,
Resolved through “–network host”. Thank you.