Skip to content

Commit

Permalink
Merge pull request #200 from NVIDIA/imex-pkg
Browse files Browse the repository at this point in the history
Add nvidia-imex package
  • Loading branch information
cdesiniotis authored Jan 28, 2025
2 parents a697a5b + acf3325 commit f2ce110
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 3 deletions.
3 changes: 3 additions & 0 deletions rhel8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ RUN if [ "$DRIVER_TYPE" != "vgpu" ] && [ "$TARGETARCH" != "arm64" ]; then \
dnf module enable -y nvidia-driver:${DRIVER_BRANCH}-dkms && \
dnf install -y ${fmPackage} ${nscqPackage}; fi

RUN if [ "$DRIVER_TYPE" != "vgpu" ] && [ "$DRIVER_BRANCH" -ge "550" ]; then \
dnf install -y nvidia-imex-${DRIVER_BRANCH}-${DRIVER_VERSION}-1; fi

COPY nvidia-driver /usr/local/bin
COPY ocp_dtk_entrypoint /usr/local/bin
COPY common.sh /usr/local/bin
Expand Down
3 changes: 3 additions & 0 deletions rhel9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ RUN if [ "$DRIVER_TYPE" != "vgpu" ] && [ "$TARGETARCH" != "arm64" ]; then \
dnf module enable -y nvidia-driver:${DRIVER_BRANCH}-dkms && \
dnf install -y nvidia-fabric-manager-${DRIVER_VERSION}-1 libnvidia-nscq-${DRIVER_BRANCH}-${DRIVER_VERSION}-1; fi

RUN if [ "$DRIVER_TYPE" != "vgpu" ] && [ "$DRIVER_BRANCH" -ge "550" ]; then \
dnf install -y nvidia-imex-${DRIVER_BRANCH}-${DRIVER_VERSION}-1; fi

COPY nvidia-driver /usr/local/bin
COPY ocp_dtk_entrypoint /usr/local/bin
COPY common.sh /usr/local/bin
Expand Down
14 changes: 13 additions & 1 deletion ubuntu20.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,19 @@ RUN if [ "$DRIVER_TYPE" != "vgpu" ]; then \
RUN if [ "$DRIVER_TYPE" != "vgpu" ] && [ "$TARGETARCH" != "arm64" ]; then \
apt-get update && \
apt-get install -y --no-install-recommends nvidia-fabricmanager-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 \
libnvidia-nscq-${DRIVER_BRANCH}=${DRIVER_VERSION}-1; fi
libnvidia-nscq-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 && \
rm -rf /var/lib/apt/lists/*; fi

# Force install the imex package to workaround a dependency issue.
# The debian packages for Ubuntu 20.04 incorrectly mark openssl >= 3
# as a dependency of the nvidia-imex-$DRIVER_BRANCH package, even
# though openssl is statically linked.
RUN if [ "$DRIVER_TYPE" != "vgpu" ] && [ "$DRIVER_BRANCH" -ge "550" ]; then \
OS_ARCH=${TARGETARCH/amd64/x86_64} && OS_ARCH=${OS_ARCH/arm64/sbsa} && \
curl -fSsL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/${OS_ARCH}/nvidia-imex-${DRIVER_BRANCH}_${DRIVER_VERSION}-1_${TARGETARCH}.deb \
-o nvidia-imex.deb && \
dpkg --force-all -i nvidia-imex.deb && \
rm nvidia-imex.deb; fi

WORKDIR /drivers

Expand Down
8 changes: 7 additions & 1 deletion ubuntu22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,13 @@ RUN if [ "$DRIVER_TYPE" != "vgpu" ]; then \
RUN if [ "$DRIVER_TYPE" != "vgpu" ] && [ "$TARGETARCH" != "arm64" ]; then \
apt-get update && \
apt-get install -y --no-install-recommends nvidia-fabricmanager-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 \
libnvidia-nscq-${DRIVER_BRANCH}=${DRIVER_VERSION}-1; fi
libnvidia-nscq-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 && \
rm -rf /var/lib/apt/lists/*; fi

RUN if [ "$DRIVER_TYPE" != "vgpu" ] && [ "$DRIVER_BRANCH" -ge "550" ]; then \
apt-get update && \
apt-get install -y --no-install-recommends nvidia-imex-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 && \
rm -rf /var/lib/apt/lists/*; fi

WORKDIR /drivers

Expand Down
5 changes: 5 additions & 0 deletions ubuntu22.04/precompiled/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ RUN apt-get update && apt-get install -y --download-only --no-install-recommends
libnvidia-nscq-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 && \
rm -rf /var/lib/apt/lists/*;

RUN if [ "$DRIVER_BRANCH" -ge "550" ]; then \
apt-get update && \
apt-get install -y --no-install-recommends nvidia-imex-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 && \
rm -rf /var/lib/apt/lists/*; fi

# update pkg cache and download pkgs for driver module installation during runtime.
# this is done to avoid shipping .ko files.
# avoid cleaning the cache after this to retain these packages during runtime.
Expand Down
8 changes: 7 additions & 1 deletion ubuntu24.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ RUN if [ "$DRIVER_TYPE" != "vgpu" ]; then \
RUN if [ "$DRIVER_TYPE" != "vgpu" ] && [ "$TARGETARCH" != "arm64" ]; then \
apt-get update && \
apt-get install -y --no-install-recommends nvidia-fabricmanager-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 \
libnvidia-nscq-${DRIVER_BRANCH}=${DRIVER_VERSION}-1; fi
libnvidia-nscq-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 && \
rm -rf /var/lib/apt/lists/*; fi

RUN if [ "$DRIVER_TYPE" != "vgpu" ] && [ "$DRIVER_BRANCH" -ge "550" ]; then \
apt-get update && \
apt-get install -y --no-install-recommends nvidia-imex-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 && \
rm -rf /var/lib/apt/lists/*; fi

WORKDIR /drivers

Expand Down
5 changes: 5 additions & 0 deletions ubuntu24.04/precompiled/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ RUN apt-get update && apt-get install -y --download-only --no-install-recommends
libnvidia-nscq-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 && \
rm -rf /var/lib/apt/lists/*;

RUN if [ "$DRIVER_BRANCH" -ge "550" ]; then \
apt-get update && \
apt-get install -y --no-install-recommends nvidia-imex-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 && \
rm -rf /var/lib/apt/lists/*; fi

# update pkg cache and download pkgs for driver module installation during runtime.
# this is done to avoid shipping .ko files.
# avoid cleaning the cache after this to retain these packages during runtime.
Expand Down

0 comments on commit f2ce110

Please sign in to comment.