Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ on:
- release-*

jobs:
check-nodocs:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is necessary. If we want to establish a policy of never downloading docs when building images, we could explore that separately. For now, we don't have to add an extra step to our CIs

runs-on: linux-amd64-cpu4
steps:
- uses: actions/checkout@v7
name: Check out code
- name: Check dnf transactions pass --nodocs
run: ./tests/check-nodocs.sh

image:
runs-on: linux-amd64-cpu4
strategy:
Expand Down
4 changes: 2 additions & 2 deletions rhel10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ENV TARGETARCH=$TARGETARCH

SHELL ["/bin/bash", "-c"]

RUN dnf update -y && dnf clean all
RUN dnf update -y --nodocs && dnf clean all

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we disable docs in a dnf.conf file so that we express this preference once instead of doing so in every dnf command?


#ARG BASE_URL=http://us.download.nvidia.com/XFree86/Linux-x86_64
ARG BASE_URL=https://us.download.nvidia.com/tesla
Expand Down Expand Up @@ -108,7 +108,7 @@ LABEL description="See summary"
# Install / upgrade packages here that are required to resolve CVEs
ARG CVE_UPDATES
RUN if [ -n "${CVE_UPDATES}" ]; then \
dnf update -y ${CVE_UPDATES} && \
dnf update -y --nodocs ${CVE_UPDATES} && \
dnf clean all; \
fi

Expand Down
30 changes: 15 additions & 15 deletions rhel10/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ echo "DRIVER_ARCH is $DRIVER_ARCH"

dep_installer () {
if [ "$DRIVER_ARCH" = "x86_64" ]; then
dnf install -y \
dnf install -y --nodocs \
libglvnd-glx \
ca-certificates \
curl-minimal \
Expand All @@ -19,7 +19,7 @@ dep_installer () {
file \
kmod
elif [ "$DRIVER_ARCH" = "ppc64le" ]; then
dnf install -y \
dnf install -y --nodocs \
libglvnd-glx \
ca-certificates \
curl-minimal \
Expand All @@ -30,7 +30,7 @@ dep_installer () {
file \
kmod
elif [ "$DRIVER_ARCH" = "aarch64" ]; then
dnf install -y \
dnf install -y --nodocs \
libglvnd-glx \
ca-certificates \
curl-minimal \
Expand All @@ -42,8 +42,8 @@ dep_installer () {
kmod
fi

if ! dnf install -y 'dnf-command(config-manager)'; then
dnf install -y dnf5-plugins
if ! dnf install -y --nodocs 'dnf-command(config-manager)'; then
dnf install -y --nodocs dnf5-plugins
fi

OS_RELEASE_ID=$(grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"')
Expand All @@ -57,23 +57,23 @@ dep_installer () {
# unzboot is only available on the EPEL RPM repo
if [ "$DRIVER_ARCH" = "aarch64" ]; then
rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-10
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
dnf install -y --nodocs https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
dnf config-manager --enable epel
# Try to install unzboot from EPEL. If it is not available yet, build it
# from source because RHEL/Rocky 10 arm64 kernel images require it.
if ! dnf install -y unzboot; then
if ! dnf install -y --nodocs unzboot; then
echo "unzboot package not available in current EPEL version; building from source."

# Install meson build dependencies
if dnf install -y git gcc meson ninja-build glib2-devel zlib-devel libzstd-devel; then
if dnf install -y --nodocs git gcc meson ninja-build glib2-devel zlib-devel libzstd-devel; then
if command -v meson >/dev/null 2>&1 && command -v ninja >/dev/null 2>&1; then
if git clone https://github.com/eballetbo/unzboot.git /tmp/unzboot-src 2>/dev/null; then
if meson setup /tmp/unzboot-src/build /tmp/unzboot-src && meson compile -C /tmp/unzboot-src/build; then
cp /tmp/unzboot-src/build/unzboot /usr/bin/unzboot
chmod +x /usr/bin/unzboot
runtime_pkgs=$(ldd /usr/bin/unzboot | awk '/=> \// { print $3 } /^\// { print $1 }' | xargs -r rpm -q --whatprovides | sort -u)
if [ -n "$runtime_pkgs" ]; then
dnf install -y $runtime_pkgs
dnf install -y --nodocs $runtime_pkgs
fi
echo "Built and installed unzboot from source"
else
Expand Down Expand Up @@ -152,35 +152,35 @@ nvidia_installer () {
}

fabricmanager_install() {
dnf install -y nvidia-fabricmanager-${DRIVER_VERSION} nvidia-fabric-manager-devel-${DRIVER_VERSION}
dnf install -y --nodocs nvidia-fabricmanager-${DRIVER_VERSION} nvidia-fabric-manager-devel-${DRIVER_VERSION}
dnf versionlock add nvidia-fabricmanager nvidia-fabric-manager-devel
}

nscq_install() {
dnf install -y libnvidia-nscq-${DRIVER_VERSION}
dnf install -y --nodocs libnvidia-nscq-${DRIVER_VERSION}
dnf versionlock add libnvidia-nscq
}

# libnvsdm packages are not available for arm64
nvsdm_install() {
if [ "$TARGETARCH" = "amd64" ]; then
dnf install -y libnvsdm-${DRIVER_VERSION}
dnf install -y --nodocs libnvsdm-${DRIVER_VERSION}
dnf versionlock add libnvsdm
fi
}

nvlink5_pkgs_install() {
dnf install -y infiniband-diags nvlsm
dnf install -y --nodocs infiniband-diags nvlsm
}

imex_install() {
dnf install -y nvidia-imex-${DRIVER_VERSION}
dnf install -y --nodocs nvidia-imex-${DRIVER_VERSION}
dnf versionlock add nvidia-imex
}

extra_pkgs_install() {
if [ "$DRIVER_TYPE" != "vgpu" ]; then
dnf install -y 'dnf-command(versionlock)'
dnf install -y --nodocs 'dnf-command(versionlock)'

fabricmanager_install
nscq_install
Expand Down
4 changes: 2 additions & 2 deletions rhel8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ENV TARGETARCH=$TARGETARCH

SHELL ["/bin/bash", "-c"]

RUN dnf update -y && dnf clean all
RUN dnf update -y --nodocs && dnf clean all

#ARG BASE_URL=http://us.download.nvidia.com/XFree86/Linux-x86_64
ARG BASE_URL=https://us.download.nvidia.com/tesla
Expand Down Expand Up @@ -106,7 +106,7 @@ LABEL description="See summary"
# Install / upgrade packages here that are required to resolve CVEs
ARG CVE_UPDATES
RUN if [ -n "${CVE_UPDATES}" ]; then \
dnf update -y ${CVE_UPDATES} && \
dnf update -y --nodocs ${CVE_UPDATES} && \
dnf clean all; \
fi

Expand Down
20 changes: 10 additions & 10 deletions rhel8/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ echo "DRIVER_ARCH is $DRIVER_ARCH"

dep_installer () {
if [ "$DRIVER_ARCH" = "x86_64" ]; then
dnf install -y \
dnf install -y --nodocs \
libglvnd-glx \
ca-certificates \
curl \
Expand All @@ -18,7 +18,7 @@ dep_installer () {
cpio \
kmod
elif [ "$DRIVER_ARCH" = "ppc64le" ]; then
dnf install -y \
dnf install -y --nodocs \
libglvnd-glx \
ca-certificates \
curl \
Expand All @@ -28,7 +28,7 @@ dep_installer () {
cpio \
kmod
elif [ "$DRIVER_ARCH" = "aarch64" ]; then
dnf install -y \
dnf install -y --nodocs \
libglvnd-glx \
ca-certificates \
curl \
Expand All @@ -39,7 +39,7 @@ dep_installer () {
kmod
fi

dnf install -y 'dnf-command(config-manager)'
dnf install -y --nodocs 'dnf-command(config-manager)'
rm -rf /var/cache/yum/*
}

Expand Down Expand Up @@ -93,35 +93,35 @@ nvidia_installer () {
}

fabricmanager_install() {
dnf install -y nvidia-fabricmanager-${DRIVER_VERSION} nvidia-fabric-manager-devel-${DRIVER_VERSION}
dnf install -y --nodocs nvidia-fabricmanager-${DRIVER_VERSION} nvidia-fabric-manager-devel-${DRIVER_VERSION}
dnf versionlock add nvidia-fabricmanager nvidia-fabric-manager-devel
}

nscq_install() {
dnf install -y libnvidia-nscq-${DRIVER_VERSION}
dnf install -y --nodocs libnvidia-nscq-${DRIVER_VERSION}
dnf versionlock add libnvidia-nscq
}

nvsdm_install() {
if [ "$TARGETARCH" = "amd64" ]; then
dnf install -y libnvsdm-${DRIVER_VERSION}
dnf install -y --nodocs libnvsdm-${DRIVER_VERSION}
dnf versionlock add libnvsdm
fi
}

nvlink5_pkgs_install() {
dnf install -y infiniband-diags nvlsm
dnf install -y --nodocs infiniband-diags nvlsm
}

imex_install() {
dnf install -y nvidia-imex-${DRIVER_VERSION}
dnf install -y --nodocs nvidia-imex-${DRIVER_VERSION}
dnf versionlock add nvidia-imex
}

extra_pkgs_install() {
if [ "$DRIVER_TYPE" != "vgpu" ]; then
dnf module enable -y nvidia-driver:${DRIVER_BRANCH}-dkms
dnf install -y 'dnf-command(versionlock)'
dnf install -y --nodocs 'dnf-command(versionlock)'

fabricmanager_install
nscq_install
Expand Down
4 changes: 2 additions & 2 deletions rhel9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ENV TARGETARCH=$TARGETARCH

SHELL ["/bin/bash", "-c"]

RUN dnf update -y && dnf clean all
RUN dnf update -y --nodocs && dnf clean all

#ARG BASE_URL=http://us.download.nvidia.com/XFree86/Linux-x86_64
ARG BASE_URL=https://us.download.nvidia.com/tesla
Expand Down Expand Up @@ -107,7 +107,7 @@ LABEL description="See summary"
# Install / upgrade packages here that are required to resolve CVEs
ARG CVE_UPDATES
RUN if [ -n "${CVE_UPDATES}" ]; then \
dnf update -y ${CVE_UPDATES} && \
dnf update -y --nodocs ${CVE_UPDATES} && \
dnf clean all; \
fi

Expand Down
22 changes: 11 additions & 11 deletions rhel9/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ echo "DRIVER_ARCH is $DRIVER_ARCH"

dep_installer () {
if [ "$DRIVER_ARCH" = "x86_64" ]; then
dnf install -y \
dnf install -y --nodocs \
libglvnd-glx \
ca-certificates \
curl-minimal \
Expand All @@ -18,7 +18,7 @@ dep_installer () {
cpio \
kmod
elif [ "$DRIVER_ARCH" = "ppc64le" ]; then
dnf install -y \
dnf install -y --nodocs \
libglvnd-glx \
ca-certificates \
curl-minimal \
Expand All @@ -28,7 +28,7 @@ dep_installer () {
cpio \
kmod
elif [ "$DRIVER_ARCH" = "aarch64" ]; then
dnf install -y \
dnf install -y --nodocs \
libglvnd-glx \
ca-certificates \
curl-minimal \
Expand All @@ -42,9 +42,9 @@ dep_installer () {
# Download unzboot as kernel images are compressed in the zboot format on RHEL 9 arm64
# unzboot is only available on the EPEL RPM repo
rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-9
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
dnf install -y --nodocs https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
dnf config-manager --enable epel
dnf install -y unzboot
dnf install -y --nodocs unzboot

rm -rf /var/cache/yum/*
}
Expand Down Expand Up @@ -99,35 +99,35 @@ nvidia_installer () {
}

fabricmanager_install() {
dnf install -y nvidia-fabricmanager-${DRIVER_VERSION} nvidia-fabric-manager-devel-${DRIVER_VERSION}
dnf install -y --nodocs nvidia-fabricmanager-${DRIVER_VERSION} nvidia-fabric-manager-devel-${DRIVER_VERSION}
dnf versionlock add nvidia-fabricmanager nvidia-fabric-manager-devel
}

nscq_install() {
dnf install -y libnvidia-nscq-${DRIVER_VERSION}
dnf install -y --nodocs libnvidia-nscq-${DRIVER_VERSION}
dnf versionlock add libnvidia-nscq
}

# libnvsdm packages are not available for arm64
nvsdm_install() {
if [ "$TARGETARCH" = "amd64" ]; then
dnf install -y libnvsdm-${DRIVER_VERSION}
dnf install -y --nodocs libnvsdm-${DRIVER_VERSION}
dnf versionlock add libnvsdm
fi
}

nvlink5_pkgs_install() {
dnf install -y infiniband-diags nvlsm
dnf install -y --nodocs infiniband-diags nvlsm
}

imex_install() {
dnf install -y nvidia-imex-${DRIVER_VERSION}
dnf install -y --nodocs nvidia-imex-${DRIVER_VERSION}
dnf versionlock add nvidia-imex
}
extra_pkgs_install() {
if [ "$DRIVER_TYPE" != "vgpu" ]; then
dnf module enable -y nvidia-driver:${DRIVER_BRANCH}-dkms
dnf install -y 'dnf-command(versionlock)'
dnf install -y --nodocs 'dnf-command(versionlock)'

# If running on a RockyLinux base image, we enable the Code Ready Builder RPM repo (crb)
OS_RELEASE_ID=$(grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"')
Expand Down
Loading