Skip to content

Commit

Permalink
install systemd
Browse files Browse the repository at this point in the history
  • Loading branch information
guptaNswati committed Oct 28, 2024
1 parent 3f36077 commit c2ff494
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ubuntu22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ RUN if [ "$(printf '%s\n' "$IMEX_DRIVER_VERSION" "$DRIVER_VERSION" | sort -V | h
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 && \
dpkg -i /tmp/nvidia-imex-${IMEX_DRIVER_VERSION}_${DRIVER_VERSION}-1_${TARGETARCH}.deb && \
nvidia-imex --version && \
apt-get update && \
apt-get install -y --no-install-recommends systemd && \
rm -rf /tmp/nvidia-imex_${IMEX_DRIVER_VERSION}_${DRIVER_VERSION}-1_${TARGETARCH}.deb; fi

WORKDIR /drivers
Expand Down
4 changes: 3 additions & 1 deletion ubuntu22.04/nvidia-driver
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ _create_driver_package() (

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

_assert_nvswitch_system() {
Expand Down Expand Up @@ -333,6 +333,7 @@ _load_driver() {

if _assert_imex_node_config; then
echo "Starting NVIDIA imex daemon..."
systemctl enable nvidia-imex.service
systemctl start nvidia-imex.service
fi

Expand Down Expand Up @@ -397,6 +398,7 @@ _unload_driver() {
if [ systemctl is-active --quiet nvidia-imex.service ]; then
echo "Stopping NVIDIA imex daemon..."
systemctl stop nvidia-imex.service
systemctl disable nvidia-imex.service
fi

echo "Unloading NVIDIA driver kernel modules..."
Expand Down
2 changes: 2 additions & 0 deletions ubuntu22.04/precompiled/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ RUN if [ "$(printf '%s\n' "$IMEX_DRIVER_VERSION" "$DRIVER_VERSION" | sort -V | h
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 && \
dpkg -i /tmp/nvidia-imex-${IMEX_DRIVER_VERSION}_${DRIVER_VERSION}-1_${TARGETARCH}.deb && \
nvidia-imex --version && \
apt-get update && \
apt-get install -y --no-install-recommends systemd && \
rm -rf /tmp/nvidia-imex_${IMEX_DRIVER_VERSION}_${DRIVER_VERSION}-1_${TARGETARCH}.deb; fi

# update pkg cache and download pkgs for driver module installation during runtime.
Expand Down
4 changes: 3 additions & 1 deletion ubuntu22.04/precompiled/nvidia-driver
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _update_package_cache() {
}

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

_assert_nvswitch_system() {
Expand Down Expand Up @@ -135,6 +135,7 @@ _load_driver() {

if _assert_imex_node_config; then
echo "Starting NVIDIA imex daemon..."
systemctl enable nvidia-imex.service
systemctl start nvidia-imex.service
fi

Expand Down Expand Up @@ -183,6 +184,7 @@ _unload_driver() {
if [ systemctl is-active --quiet nvidia-imex.service ]; then
echo "Stopping NVIDIA imex daemon..."
systemctl stop nvidia-imex.service
systemctl disable nvidia-imex.service
fi

echo "Unloading NVIDIA driver kernel modules..."
Expand Down

0 comments on commit c2ff494

Please sign in to comment.