File tree Expand file tree Collapse file tree 4 files changed +48
-0
lines changed Expand file tree Collapse file tree 4 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,14 @@ RUN if [ "$DRIVER_TYPE" != "vgpu" ] && [ "$TARGETARCH" != "arm64" ]; then \
8686 apt-get install -y --no-install-recommends nvidia-fabricmanager-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 \
8787 libnvidia-nscq-${DRIVER_BRANCH}=${DRIVER_VERSION}-1; fi
8888
89+ # For now install imex only on arm64 and R560+
90+ # https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/sbsa/nvidia-imex_560.28.03-1_arm64.deb
91+ RUN DRIVER_MAJOR_VERSION=$(echo "$DRIVER_VERSION" | cut -d '.' -f 1)
92+ RUN if [ "$DRIVER_MAJOR_VERSION" -ge 560 ] && [ "$TARGETARCH" = "arm64" ]; then \
93+ curl -fsSL -o /tmp/nvidia-imex_$DRIVER_VERSION-1_$TARGETARCH.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/sbsa/nvidia-imex_560.28.03-1_arm64.deb && \
94+ dpkg -i /tmp/nvidia-imex_$DRIVER_VERSION-1_$TARGETARCH.deb && \
95+ rm -rf /tmp/nvidia-imex_$DRIVER_VERSION-1_$TARGETARCH.deb; fi
96+
8997WORKDIR /drivers
9098
9199ARG PUBLIC_KEY=empty
Original file line number Diff line number Diff line change @@ -187,6 +187,11 @@ _create_driver_package() (
187187 mv ${pkg_name} precompiled
188188)
189189
190+ # Check if imex node config is present
191+ _assert_imex_node_config () {
192+ [ -f /etc/nvidia-imex/node_config.cfg ]] || return 1
193+ }
194+
190195_assert_nvswitch_system () {
191196 [ -d /proc/driver/nvidia-nvswitch/devices ] || return 1
192197 if [ -z " $( ls -A /proc/driver/nvidia-nvswitch/devices) " ]; then
@@ -326,6 +331,11 @@ _load_driver() {
326331 nv-fabricmanager -c /usr/share/nvidia/nvswitch/fabricmanager.cfg
327332 fi
328333
334+ if _assert_imex_node_config; then
335+ echo " Starting NVIDIA imex daemon..."
336+ systemctl start nvidia-imex.service
337+ fi
338+
329339 return 0
330340}
331341
@@ -383,6 +393,12 @@ _unload_driver() {
383393 fi
384394 fi
385395
396+ # stop nvidia-imex daemon
397+ if [ systemctl is-active --quiet nvidia-imex.service ]; then
398+ echo " Stopping NVIDIA imex daemon..."
399+ systemctl stop nvidia-imex.service
400+ fi
401+
386402 echo " Unloading NVIDIA driver kernel modules..."
387403 if [ -f /sys/module/nvidia_modeset/refcnt ]; then
388404 nvidia_modeset_refs=$( < /sys/module/nvidia_modeset/refcnt)
Original file line number Diff line number Diff line change @@ -59,6 +59,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends nvidia-driver-$
5959 xserver-xorg-video-nvidia-${DRIVER_BRANCH}-server && \
6060 rm -rf /var/lib/apt/lists/*;
6161
62+ # For now install imex only with on arm64 and R560+
63+ # https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/sbsa/nvidia-imex_560.28.03-1_arm64.deb
64+ ARG TARGETARCH
65+ ENV TARGETARCH=$TARGETARCH
66+ RUN DRIVER_MAJOR_VERSION=$(echo "$DRIVER_VERSION" | cut -d '.' -f 1)
67+ RUN if [ "$DRIVER_MAJOR_VERSION" -ge 560 ] && [ "$TARGETARCH" = "arm64" ]; then \
68+ curl -fsSL -o /tmp/nvidia-imex_$DRIVER_VERSION-1_$TARGETARCH.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/sbsa/nvidia-imex_$DRIVER_VERSION-1_$TARGETARCH.deb && \
69+ dpkg -i /tmp/nvidia-imex_$DRIVER_VERSION-1_$TARGETARCH.deb && \
70+ rm -rf /tmp/nvidia-imex_$DRIVER_VERSION-1_$TARGETARCH.deb; fi
71+
6272# update pkg cache and download pkgs for driver module installation during runtime.
6373# this is done to avoid shipping .ko files.
6474# avoid cleaning the cache after this to retain these packages during runtime.
Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ _update_package_cache() {
2222 fi
2323}
2424
25+ _assert_imex_node_config () {
26+ [ -f /etc/nvidia-imex/node_config.cfg ]] || return 1
27+ }
28+
2529_assert_nvswitch_system () {
2630 [ -d /proc/driver/nvidia-nvswitch/devices ] || return 1
2731 if [ -z " $( ls -A /proc/driver/nvidia-nvswitch/devices) " ]; then
@@ -129,6 +133,11 @@ _load_driver() {
129133 nv-fabricmanager -c /usr/share/nvidia/nvswitch/fabricmanager.cfg
130134 fi
131135
136+ if _assert_imex_node_config; then
137+ echo " Starting NVIDIA imex daemon..."
138+ systemctl start nvidia-imex.service
139+ fi
140+
132141 return 0
133142}
134143
@@ -171,6 +180,11 @@ _unload_driver() {
171180 fi
172181 fi
173182
183+ if [ systemctl is-active --quiet nvidia-imex.service ]; then
184+ echo " Stopping NVIDIA imex daemon..."
185+ systemctl stop nvidia-imex.service
186+ fi
187+
174188 echo " Unloading NVIDIA driver kernel modules..."
175189 if [ -f /sys/module/nvidia_drm/refcnt ]; then
176190 nvidia_drm_refs=$( < /sys/module/nvidia_drm/refcnt)
You can’t perform that action at this time.
0 commit comments