diff --git a/parts/k8s/kubernetescustomscript.sh b/parts/k8s/kubernetescustomscript.sh index efa97c100..4ec1cd069 100755 --- a/parts/k8s/kubernetescustomscript.sh +++ b/parts/k8s/kubernetescustomscript.sh @@ -73,6 +73,12 @@ fi installContainerRuntime installNetworkPlugin installContainerd +if [[ "${GPU_NODE}" = true ]]; then + if $FULL_INSTALL_REQUIRED; then + installGPUDrivers + fi + ensureGPUDrivers +fi installKubeletAndKubectl ensureRPC createKubeManifestDir @@ -122,13 +128,6 @@ if [[ ! -z "${MASTER_NODE}" ]]; then ensurePodSecurityPolicy fi -if [[ "${GPU_NODE}" = true ]]; then - if $FULL_INSTALL_REQUIRED; then - installGPUDrivers - fi - ensureGPUDrivers -fi - if $FULL_INSTALL_REQUIRED; then if [[ $OS == $UBUNTU_OS_NAME ]]; then # mitigation for bug https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1676635