diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 4dcf2c1b00c9..73509071bfcd 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -1456,6 +1456,9 @@ func validateGPUs(value, drvName, rtime string) error { if value == "" { return nil } + if err := validateGPUsArch(); err != nil { + return err + } if value != "nvidia" && value != "all" { return errors.Errorf(`The gpus flag must be passed a value of "nvidia" or "all"`) } @@ -1465,6 +1468,14 @@ func validateGPUs(value, drvName, rtime string) error { return errors.Errorf("The gpus flag can only be used with the docker driver and docker container-runtime") } +func validateGPUsArch() error { + switch runtime.GOARCH { + case "amd64", "arm64", "ppc64le": + return nil + } + return errors.Errorf("The GPUs flag is only supported on amd64, arm64 & ppc64le, currently using %s", runtime.GOARCH) +} + func getContainerRuntime(old *config.ClusterConfig) string { paramRuntime := viper.GetString(containerRuntime) diff --git a/deploy/kicbase/Dockerfile b/deploy/kicbase/Dockerfile index 52643c4a452e..5ea8977b76ed 100644 --- a/deploy/kicbase/Dockerfile +++ b/deploy/kicbase/Dockerfile @@ -210,6 +210,15 @@ RUN export ARCH=$(dpkg --print-architecture | sed 's/ppc64el/ppc64le/' | sed 's/ apt-key add - < Release.key && \ clean-install cri-o cri-o-runc; fi +# install NVIDIA container toolkit +RUN export ARCH=$(dpkg --print-architecture) && \ + if [ "$ARCH" = 'amd64' ] || [ "$ARCH" = 'arm64' ] || [ "$ARCH" = 'ppc64el' ]; then \ + curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg && \ + curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \ + sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ + sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list && \ + clean-install nvidia-container-toolkit; fi + # install version.json ARG VERSION_JSON RUN echo "${VERSION_JSON}" > /version.json diff --git a/pkg/drivers/kic/types.go b/pkg/drivers/kic/types.go index 3e0a339e9d2a..5e982c3b18b7 100644 --- a/pkg/drivers/kic/types.go +++ b/pkg/drivers/kic/types.go @@ -24,10 +24,10 @@ import ( const ( // Version is the current version of kic - Version = "v0.0.41-1698773672-17486" + Version = "v0.0.41-1698881667-17516" // SHA of the kic base image - baseImageSHA = "a46d6433f6f7543af472f7b8b305faa2da36b546834792a3c1a481f02ce07458" + baseImageSHA = "966390c8d9b756c6e7044095f0ca5e5551da4c170cb501439eea24d1ad19bb89" // The name of the GCR kicbase repository gcrRepo = "gcr.io/k8s-minikube/kicbase-builds" // The name of the Dockerhub kicbase repository diff --git a/pkg/minikube/cruntime/docker.go b/pkg/minikube/cruntime/docker.go index e4199b9b2c3b..c4cbead6265d 100644 --- a/pkg/minikube/cruntime/docker.go +++ b/pkg/minikube/cruntime/docker.go @@ -39,7 +39,6 @@ import ( "k8s.io/minikube/pkg/minikube/docker" "k8s.io/minikube/pkg/minikube/download" "k8s.io/minikube/pkg/minikube/image" - "k8s.io/minikube/pkg/minikube/out" "k8s.io/minikube/pkg/minikube/style" "k8s.io/minikube/pkg/minikube/sysinit" ) @@ -568,9 +567,6 @@ func (r *Docker) configureDocker(driver string) error { StorageDriver: "overlay2", } if r.GPUs { - if err := r.installNvidiaContainerToolkit(); err != nil { - return fmt.Errorf("failed installing the NVIDIA Container Toolkit: %v", err) - } assets.Addons["nvidia-device-plugin"].EnableByDefault() daemonConfig.DefaultRuntime = "nvidia" runtimes := &dockerDaemonRuntimes{} @@ -585,30 +581,6 @@ func (r *Docker) configureDocker(driver string) error { return r.Runner.Copy(ma) } -// installNvidiaContainerToolkit installs the NVIDIA Container Toolkit -// https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html -func (r *Docker) installNvidiaContainerToolkit() error { - out.Styled(style.Warning, "Using GPUs with the Docker driver is experimental, if you experience any issues please report them at: https://github.com/kubernetes/minikube/issues/new/choose") - if _, err := r.Runner.RunCmd(exec.Command("dpkg", "-l", "nvidia-container-toolkit")); err == nil { - klog.Info("nvidia-container-toolkit is already installed, skipping install") - return nil - } - out.Styled(style.Toolkit, "Installing the NVIDIA Container Toolkit...") - cmds := []string{ - "curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg", - "curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list", - "sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit", - } - - for _, cmd := range cmds { - c := exec.Command("/bin/bash", "-c", cmd) - if _, err := r.Runner.RunCmd(c); err != nil { - return err - } - } - return nil -} - // Preload preloads docker with k8s images: // 1. Copy over the preloaded tarball into the VM // 2. Extract the preloaded tarball to the correct directory diff --git a/site/content/en/docs/commands/start.md b/site/content/en/docs/commands/start.md index 61a737d64d59..db367c486540 100644 --- a/site/content/en/docs/commands/start.md +++ b/site/content/en/docs/commands/start.md @@ -27,7 +27,7 @@ minikube start [flags] --apiserver-port int The apiserver listening port (default 8443) --auto-pause-interval duration Duration of inactivity before the minikube VM is paused (default 1m0s). To disable, set to 0s (default 1m0s) --auto-update-drivers If set, automatically updates drivers to the latest version. Defaults to true. (default true) - --base-image string The base image to use for docker/podman drivers. Intended for local development. (default "gcr.io/k8s-minikube/kicbase-builds:v0.0.41-1698773672-17486@sha256:a46d6433f6f7543af472f7b8b305faa2da36b546834792a3c1a481f02ce07458") + --base-image string The base image to use for docker/podman drivers. Intended for local development. (default "gcr.io/k8s-minikube/kicbase-builds:v0.0.41-1698881667-17516@sha256:966390c8d9b756c6e7044095f0ca5e5551da4c170cb501439eea24d1ad19bb89") --binary-mirror string Location to fetch kubectl, kubelet, & kubeadm binaries from. --cache-images If true, cache docker images for the current bootstrapper and load them into the machine. Always false with --driver=none. (default true) --cert-expiration duration Duration until minikube certificate expiration, defaults to three years (26280h). (default 26280h0m0s) diff --git a/translations/de.json b/translations/de.json index 593daeb57aba..6a4bf8da880b 100644 --- a/translations/de.json +++ b/translations/de.json @@ -389,7 +389,6 @@ "Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.": "Unsichere Docker-Registrys, die an den Docker-Daemon übergeben werden. Der CIDR-Bereich des Standarddienstes wird automatisch hinzugefügt.", "Install VirtualBox and ensure it is in the path, or select an alternative value for --driver": "Installieren Sie VirtualBox und stellen Sie sicher, dass es im Pfad ist. Alternativ verwenden Sie einen anderen --driver", "Install the latest hyperkit binary, and run 'minikube delete'": "Installieren Sie das aktuellste hyperkit-Binary und führen Sie 'minikube delete' aus", - "Installing the NVIDIA Container Toolkit...": "", "Invalid port": "Falscher Port", "Istio needs {{.minCPUs}} CPUs -- your configuration only allocates {{.cpus}} CPUs": "Istio benötigt {{.minCPUs}} CPUs -- Ihre Konfiguration reserviert nur {{.cpus}} CPUs", "Istio needs {{.minMem}}MB of memory -- your configuration only allocates {{.memory}}MB": "Istio benötigt {{.minMem}}MB Speicher -- Ihre Konfiguration reserviert nur {{.memory}}MB", @@ -884,7 +883,6 @@ "User name must be 60 chars or less.": "Der Benutzername kann 60 oder weniger Zeichen lang sein", "Userspace file server is shutdown": "Userspace File Server ist heruntergefahren", "Userspace file server: ": "Userspace File Server:", - "Using GPUs with the Docker driver is experimental, if you experience any issues please report them at: https://github.com/kubernetes/minikube/issues/new/choose": "", "Using Kubernetes v1.24+ with the Docker runtime requires cri-docker to be installed": "", "Using Kubernetes {{.version}} since patch version was unspecified": "", "Using image repository {{.name}}": "Verwenden des Image-Repositorys {{.name}}", diff --git a/translations/es.json b/translations/es.json index 3f2ac9e4e961..20c7458c615a 100644 --- a/translations/es.json +++ b/translations/es.json @@ -395,7 +395,6 @@ "Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.": "Registros de Docker que no son seguros y que se transferirán al daemon de Docker. Se añadirá automáticamente el intervalo CIDR de servicio predeterminado.", "Install VirtualBox and ensure it is in the path, or select an alternative value for --driver": "", "Install the latest hyperkit binary, and run 'minikube delete'": "", - "Installing the NVIDIA Container Toolkit...": "", "Invalid port": "", "Istio needs {{.minCPUs}} CPUs -- your configuration only allocates {{.cpus}} CPUs": "", "Istio needs {{.minMem}}MB of memory -- your configuration only allocates {{.memory}}MB": "", @@ -881,7 +880,6 @@ "User name must be 60 chars or less.": "", "Userspace file server is shutdown": "", "Userspace file server: ": "", - "Using GPUs with the Docker driver is experimental, if you experience any issues please report them at: https://github.com/kubernetes/minikube/issues/new/choose": "", "Using Kubernetes v1.24+ with the Docker runtime requires cri-docker to be installed": "", "Using Kubernetes {{.version}} since patch version was unspecified": "", "Using image repository {{.name}}": "Utilizando el repositorio de imágenes {{.name}}", diff --git a/translations/ja.json b/translations/ja.json index 096241f7e7a7..4bd839528c48 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -368,7 +368,6 @@ "Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.": "Docker デーモンに渡す安全でない Docker レジストリー。デフォルトのサービス CIDR 範囲が自動的に追加されます。", "Install VirtualBox and ensure it is in the path, or select an alternative value for --driver": "VritualBox をインストールして、VirtualBox がパス中にあることを確認するか、--driver に別の値を指定してください", "Install the latest hyperkit binary, and run 'minikube delete'": "最新の hyperkit バイナリーをインストールして、'minikube delete' を実行してください", - "Installing the NVIDIA Container Toolkit...": "", "Invalid port": "無効なポート", "Istio needs {{.minCPUs}} CPUs -- your configuration only allocates {{.cpus}} CPUs": "Istio は {{.minCPUs}} 個の CPU を必要とします -- あなたの設定では {{.cpus}} 個の CPU しか割り当てていません", "Istio needs {{.minMem}}MB of memory -- your configuration only allocates {{.memory}}MB": "Istio は {{.minMem}}MB のメモリーを必要とします -- あなたの設定では、{{.memory}}MB しか割り当てていません", @@ -829,7 +828,6 @@ "User name must be 60 chars or less.": "ユーザー名は 60 文字以内でなければなりません。", "Userspace file server is shutdown": "ユーザースペースのファイルサーバーが停止しました", "Userspace file server: ": "ユーザースペースのファイルサーバー: ", - "Using GPUs with the Docker driver is experimental, if you experience any issues please report them at: https://github.com/kubernetes/minikube/issues/new/choose": "", "Using Kubernetes v1.24+ with the Docker runtime requires cri-docker to be installed": "Docker ランタイムで Kubernetes v1.24+ を使用するには、cri-docker をインストールする必要があります", "Using Kubernetes {{.version}} since patch version was unspecified": "", "Using image repository {{.name}}": "{{.name}} イメージリポジトリーを使用しています", diff --git a/translations/ko.json b/translations/ko.json index fa6734187c6f..a48df0d2638f 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -407,7 +407,6 @@ "Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.": "", "Install VirtualBox and ensure it is in the path, or select an alternative value for --driver": "", "Install the latest hyperkit binary, and run 'minikube delete'": "", - "Installing the NVIDIA Container Toolkit...": "", "Invalid port": "", "Istio needs {{.minCPUs}} CPUs -- your configuration only allocates {{.cpus}} CPUs": "", "Istio needs {{.minMem}}MB of memory -- your configuration only allocates {{.memory}}MB": "", @@ -878,7 +877,6 @@ "User name must be 60 chars or less.": "", "Userspace file server is shutdown": "", "Userspace file server: ": "", - "Using GPUs with the Docker driver is experimental, if you experience any issues please report them at: https://github.com/kubernetes/minikube/issues/new/choose": "", "Using Kubernetes v1.24+ with the Docker runtime requires cri-docker to be installed": "", "Using Kubernetes {{.version}} since patch version was unspecified": "", "Using image repository {{.name}}": "", diff --git a/translations/pl.json b/translations/pl.json index 3224ab709370..bd0d2bcf7d5d 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -394,7 +394,6 @@ "Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.": "", "Install VirtualBox and ensure it is in the path, or select an alternative value for --driver": "", "Install the latest hyperkit binary, and run 'minikube delete'": "", - "Installing the NVIDIA Container Toolkit...": "", "Invalid port": "", "Invalid size passed in argument: {{.error}}": "Nieprawidłowy rozmiar przekazany w argumencie: {{.error}}", "Istio needs {{.minCPUs}} CPUs -- your configuration only allocates {{.cpus}} CPUs": "", @@ -888,7 +887,6 @@ "User name must be 60 chars or less.": "", "Userspace file server is shutdown": "", "Userspace file server: ": "", - "Using GPUs with the Docker driver is experimental, if you experience any issues please report them at: https://github.com/kubernetes/minikube/issues/new/choose": "", "Using Kubernetes v1.24+ with the Docker runtime requires cri-docker to be installed": "", "Using Kubernetes {{.version}} since patch version was unspecified": "", "Using image repository {{.name}}": "", diff --git a/translations/ru.json b/translations/ru.json index 17a6e3e01cb1..15cba5dc3882 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -360,7 +360,6 @@ "Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.": "", "Install VirtualBox and ensure it is in the path, or select an alternative value for --driver": "", "Install the latest hyperkit binary, and run 'minikube delete'": "", - "Installing the NVIDIA Container Toolkit...": "", "Invalid port": "", "Istio needs {{.minCPUs}} CPUs -- your configuration only allocates {{.cpus}} CPUs": "", "Istio needs {{.minMem}}MB of memory -- your configuration only allocates {{.memory}}MB": "", @@ -814,7 +813,6 @@ "User name must be 60 chars or less.": "", "Userspace file server is shutdown": "", "Userspace file server: ": "", - "Using GPUs with the Docker driver is experimental, if you experience any issues please report them at: https://github.com/kubernetes/minikube/issues/new/choose": "", "Using Kubernetes v1.24+ with the Docker runtime requires cri-docker to be installed": "", "Using Kubernetes {{.version}} since patch version was unspecified": "", "Using image repository {{.name}}": "", diff --git a/translations/strings.txt b/translations/strings.txt index 179ee40667e9..73a97675dee7 100644 --- a/translations/strings.txt +++ b/translations/strings.txt @@ -360,7 +360,6 @@ "Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.": "", "Install VirtualBox and ensure it is in the path, or select an alternative value for --driver": "", "Install the latest hyperkit binary, and run 'minikube delete'": "", - "Installing the NVIDIA Container Toolkit...": "", "Invalid port": "", "Istio needs {{.minCPUs}} CPUs -- your configuration only allocates {{.cpus}} CPUs": "", "Istio needs {{.minMem}}MB of memory -- your configuration only allocates {{.memory}}MB": "", @@ -814,7 +813,6 @@ "User name must be 60 chars or less.": "", "Userspace file server is shutdown": "", "Userspace file server: ": "", - "Using GPUs with the Docker driver is experimental, if you experience any issues please report them at: https://github.com/kubernetes/minikube/issues/new/choose": "", "Using Kubernetes v1.24+ with the Docker runtime requires cri-docker to be installed": "", "Using Kubernetes {{.version}} since patch version was unspecified": "", "Using image repository {{.name}}": "", diff --git a/translations/zh-CN.json b/translations/zh-CN.json index e7ac8c4c976a..6e4b38ebfd7c 100644 --- a/translations/zh-CN.json +++ b/translations/zh-CN.json @@ -472,7 +472,6 @@ "Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.": "传递给 Docker 守护进程的不安全 Docker 注册表。系统会自动添加默认服务 CIDR 范围。", "Install VirtualBox and ensure it is in the path, or select an alternative value for --driver": "安装 VirtualBox 并确保它在路径中,或选择一个替代的值作为 --driver。", "Install the latest hyperkit binary, and run 'minikube delete'": "安装最新的 hyperkit 二进制文件,然后运行 'minikube delete'", - "Installing the NVIDIA Container Toolkit...": "", "Invalid port": "无效的端口", "Istio needs {{.minCPUs}} CPUs -- your configuration only allocates {{.cpus}} CPUs": "Istio 需要 {{.minCPUs}} 个CPU核心,但您的配置只分配了 {{.cpus}} 个CPU核心。", "Istio needs {{.minMem}}MB of memory -- your configuration only allocates {{.memory}}MB": "Istio 需要 {{.minMem}}MB 内存,而你的配置只分配了 {{.memory}}MB", @@ -994,7 +993,6 @@ "User name must be 60 chars or less.": "用户名必须为 60 个字符或更少。", "Userspace file server is shutdown": "", "Userspace file server: ": "", - "Using GPUs with the Docker driver is experimental, if you experience any issues please report them at: https://github.com/kubernetes/minikube/issues/new/choose": "", "Using Kubernetes v1.24+ with the Docker runtime requires cri-docker to be installed": "", "Using Kubernetes {{.version}} since patch version was unspecified": "使用 Kubernetes {{.version}},因为未指定修补程序版本", "Using image repository {{.name}}": "正在使用镜像存储库 {{.name}}",