Hello,
I am encountering an issue during the Docker build process specifically with the Ultralytics image on my Jetson Nano AGX Developer Kit. Below is my Dockerfile and the error message I am receiving.
Dockerfile:
# Use the specified base image for Jetson Jetpack
FROM ultralytics/ultralytics:latest-jetson-jetpack5
USER root
# Set environment variable to ensure apt-get runs non-interactively
ENV DEBIAN_FRONTEND=noninteractive
# Update the package list and install libx11-dev
RUN apt-get update -y && apt-get install -y libx11-dev
# Install Xvfb
RUN apt-get update --allow-releaseinfo-change && apt-get install -y xvfb
# Install system dependencies and additional libraries
RUN apt-get update && \
apt-get install -y \
libxcb1 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-render-util0 \
libxcb-xinerama0 \
libxcb-xkb1 \
libxkbcommon-x11-0 \
libsm6 \
python3-pip \
python3-dev \
libgl1-mesa-glx && \
rm -rf /var/lib/apt/lists/*
# Copy requirements file
COPY requirements.txt .
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy your application code
COPY . .
# Expose the port your app runs on
EXPOSE 5500
# Start Xvfb and run your application
CMD ["sh", "-c", "Xvfb :0 -screen 0 1024x768x24 & python app.py"]
Error Message:
Err:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Could not resolve 'ports.ubuntu.com'
Err:2 https://repo.download.nvidia.com/jetson/common r35.2 InRelease
Could not resolve 'repo.download.nvidia.com'
...
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/libx/libx11/libx11-dev_1.6.9-2ubuntu1.6_arm64.deb Could not resolve 'ports.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Screenshot:
Steps Taken:
- Verified the Docker Daemon Configuration.
2. Attempted various fixes including re-running apt-get update and apt-get install commands with different flags.
Despite these attempts, I continue to face errors during the build process. It is important to note that all other Dockerfiles build successfully on my Jetson Nano AGX, so the issue seems specific to this Ultralytics Dockerfile.
Request:
Could someone please guide me on how to resolve this issue during the Docker build of Ultralytics image on the Jetson Nano AGX Developer Tool? Any help would be greatly appreciated.
Thank you.