From 48e42f8ab685fd7e5ae7b7899ed31eb306474607 Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Tue, 25 Feb 2025 16:33:47 +0100 Subject: [PATCH] setup-nvidia: Keep systemd unit when running nspawn container The nspawn container runs in it's own scope, which journal output is then associated with. By passing `--keep-unit` we can guarantee that all log output will stay associated with the nvidia.service and can be viewed by running `journalctl -u nvidia.service`. Signed-off-by: Jeremi Piotrowski --- .../x11-drivers/nvidia-drivers/files/bin/setup-nvidia | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/files/bin/setup-nvidia b/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/files/bin/setup-nvidia index 15fc458465..dea42857af 100644 --- a/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/files/bin/setup-nvidia +++ b/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/files/bin/setup-nvidia @@ -67,7 +67,7 @@ function extract_nvidia_installer() { function run_nspawn_container() { echo Spawn system-nspawn container to install the NVIDIA drivers - sudo systemd-nspawn --read-only --volatile=overlay --image="${FLATCAR_ROOT_WORKDIR}/${FLATCAR_DEVELOPER_CONTAINER}" --bind="${FLATCAR_ROOT_WORKDIR}/${NVIDIA_WORKDIR}":/nvidia --bind=/usr/lib/nvidia/bin:/app/bin/ /app/bin/install-nvidia "$NVIDIA_DRIVER_BASENAME" + sudo systemd-nspawn --keep-unit --register=no --read-only --volatile=overlay --image="${FLATCAR_ROOT_WORKDIR}/${FLATCAR_DEVELOPER_CONTAINER}" --bind="${FLATCAR_ROOT_WORKDIR}/${NVIDIA_WORKDIR}":/nvidia --bind=/usr/lib/nvidia/bin:/app/bin/ /app/bin/install-nvidia "$NVIDIA_DRIVER_BASENAME" } function copy_nvidia_build_artifacts() {