Skip to content

Commit 3a062c1

Browse files
committed
install systemd
1 parent 3f36077 commit 3a062c1

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

ubuntu22.04/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ RUN if [ "$(printf '%s\n' "$IMEX_DRIVER_VERSION" "$DRIVER_VERSION" | sort -V | h
9393
curl -fsSL -o /tmp/nvidia-imex-${IMEX_DRIVER_VERSION}_${DRIVER_VERSION}-1_${TARGETARCH}.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/sbsa/nvidia-imex-${IMEX_DRIVER_VERSION}_${DRIVER_VERSION}-1_${TARGETARCH}.deb && \
9494
dpkg -i /tmp/nvidia-imex-${IMEX_DRIVER_VERSION}_${DRIVER_VERSION}-1_${TARGETARCH}.deb && \
9595
nvidia-imex --version && \
96+
apt-get update && \
97+
apt-get install -y --no-install-recommends systemd && \
9698
rm -rf /tmp/nvidia-imex_${IMEX_DRIVER_VERSION}_${DRIVER_VERSION}-1_${TARGETARCH}.deb; fi
9799

98100
WORKDIR /drivers

ubuntu22.04/nvidia-driver

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ _create_driver_package() (
189189

190190
# Check if imex node config is present
191191
_assert_imex_node_config() {
192-
[ -f /etc/nvidia-imex/node_config.cfg ]] || return 1
192+
[ -f /etc/nvidia-imex/nodes_config.cfg ] || return 1
193193
}
194194

195195
_assert_nvswitch_system() {
@@ -333,7 +333,9 @@ _load_driver() {
333333

334334
if _assert_imex_node_config; then
335335
echo "Starting NVIDIA imex daemon..."
336+
systemctl enable nvidia-imex.service
336337
systemctl start nvidia-imex.service
338+
systemctl status nvidia-imex.service
337339
fi
338340

339341
return 0
@@ -394,9 +396,11 @@ _unload_driver() {
394396
fi
395397

396398
# stop nvidia-imex daemon
397-
if [ systemctl is-active --quiet nvidia-imex.service ]; then
399+
if systemctl is-active --quiet nvidia-imex.service; then
398400
echo "Stopping NVIDIA imex daemon..."
399401
systemctl stop nvidia-imex.service
402+
systemctl status nvidia-imex.service
403+
systemctl disable nvidia-imex.service
400404
fi
401405

402406
echo "Unloading NVIDIA driver kernel modules..."

ubuntu22.04/precompiled/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ RUN if [ "$(printf '%s\n' "$IMEX_DRIVER_VERSION" "$DRIVER_VERSION" | sort -V | h
6666
curl -fsSL -o /tmp/nvidia-imex-${IMEX_DRIVER_VERSION}_${DRIVER_VERSION}-1_${TARGETARCH}.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/sbsa/nvidia-imex-${IMEX_DRIVER_VERSION}_${DRIVER_VERSION}-1_${TARGETARCH}.deb && \
6767
dpkg -i /tmp/nvidia-imex-${IMEX_DRIVER_VERSION}_${DRIVER_VERSION}-1_${TARGETARCH}.deb && \
6868
nvidia-imex --version && \
69+
apt-get update && \
70+
apt-get install -y --no-install-recommends systemd && \
6971
rm -rf /tmp/nvidia-imex_${IMEX_DRIVER_VERSION}_${DRIVER_VERSION}-1_${TARGETARCH}.deb; fi
7072

7173
# update pkg cache and download pkgs for driver module installation during runtime.

ubuntu22.04/precompiled/nvidia-driver

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ _update_package_cache() {
2323
}
2424

2525
_assert_imex_node_config() {
26-
[ -f /etc/nvidia-imex/node_config.cfg ]] || return 1
26+
[ -f /etc/nvidia-imex/nodes_config.cfg ] || return 1
2727
}
2828

2929
_assert_nvswitch_system() {
@@ -135,7 +135,9 @@ _load_driver() {
135135

136136
if _assert_imex_node_config; then
137137
echo "Starting NVIDIA imex daemon..."
138+
systemctl enable nvidia-imex.service
138139
systemctl start nvidia-imex.service
140+
systemctl status nvidia-imex.service
139141
fi
140142

141143
return 0
@@ -180,9 +182,11 @@ _unload_driver() {
180182
fi
181183
fi
182184

183-
if [ systemctl is-active --quiet nvidia-imex.service ]; then
185+
if systemctl is-active --quiet nvidia-imex.service; then
184186
echo "Stopping NVIDIA imex daemon..."
185187
systemctl stop nvidia-imex.service
188+
systemctl status nvidia-imex.service
189+
systemctl disable nvidia-imex.service
186190
fi
187191

188192
echo "Unloading NVIDIA driver kernel modules..."

0 commit comments

Comments
 (0)