From c050bcf081dd60a1b332e97c14dcaa4c631dae65 Mon Sep 17 00:00:00 2001 From: Evan Lezar <7723350-elezar@users.noreply.gitlab.com> Date: Wed, 17 Jan 2024 21:28:14 +0000 Subject: [PATCH] Merge branch 'add-crun-as-configured-runtime' into 'main' Set default low-level runtimes to runc, crun See merge request nvidia/container-toolkit/container-toolkit!536 --- CHANGELOG.md | 1 + internal/config/config.go | 2 +- internal/config/config_test.go | 6 +++--- internal/config/toml_test.go | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06e56784..5c6cedb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ * Remove package dependency on libseccomp. * Added detection of libnvdxgdmal.so.1 on WSL2. * Fix bug in determining default nvidia-container-runtime.user config value on SUSE-based systems. +* Add `crun` to the list of configured low-level runtimes. * [toolkit-container] Bump CUDA base image version to 12.3.1. diff --git a/internal/config/config.go b/internal/config/config.go index 1d0f5abd..3e3eed49 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -102,7 +102,7 @@ func GetDefault() (*Config, error) { NVIDIAContainerRuntimeConfig: RuntimeConfig{ DebugFilePath: "/dev/null", LogLevel: "info", - Runtimes: []string{"docker-runc", "runc"}, + Runtimes: []string{"docker-runc", "runc", "crun"}, Mode: "auto", Modes: modesConfig{ CSV: csvModeConfig{ diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 5cb6cbc2..caa36800 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -65,7 +65,7 @@ func TestGetConfig(t *testing.T) { NVIDIAContainerRuntimeConfig: RuntimeConfig{ DebugFilePath: "/dev/null", LogLevel: "info", - Runtimes: []string{"docker-runc", "runc"}, + Runtimes: []string{"docker-runc", "runc", "crun"}, Mode: "auto", Modes: modesConfig{ CSV: csvModeConfig{ @@ -228,7 +228,7 @@ func TestGetConfig(t *testing.T) { NVIDIAContainerRuntimeConfig: RuntimeConfig{ DebugFilePath: "/dev/null", LogLevel: "info", - Runtimes: []string{"docker-runc", "runc"}, + Runtimes: []string{"docker-runc", "runc", "crun"}, Mode: "auto", Modes: modesConfig{ CSV: csvModeConfig{ @@ -268,7 +268,7 @@ func TestGetConfig(t *testing.T) { NVIDIAContainerRuntimeConfig: RuntimeConfig{ DebugFilePath: "/dev/null", LogLevel: "info", - Runtimes: []string{"docker-runc", "runc"}, + Runtimes: []string{"docker-runc", "runc", "crun"}, Mode: "auto", Modes: modesConfig{ CSV: csvModeConfig{ diff --git a/internal/config/toml_test.go b/internal/config/toml_test.go index 710b5f76..e017db15 100644 --- a/internal/config/toml_test.go +++ b/internal/config/toml_test.go @@ -62,7 +62,7 @@ load-kmods = true #debug = "/var/log/nvidia-container-runtime.log" log-level = "info" mode = "auto" -runtimes = ["docker-runc", "runc"] +runtimes = ["docker-runc", "runc", "crun"] [nvidia-container-runtime.modes]