Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit 29434e9

Browse files
committed
Kubernetes GPU: ensure nvidia drivers install after docker is installed (#3517)
1 parent 6d4e35d commit 29434e9

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

parts/k8s/kubernetesagentcustomdata.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ runcmd:
171171
- . /opt/azure/containers/provision_source.sh
172172
- timeout 10 apt-mark hold walinuxagent{{GetKubernetesAgentPreprovisionYaml .}}
173173
- timeout 10 apt-mark unhold walinuxagent
174+
- mkdir -p /var/log/azure && touch /var/log/azure/cloud-init.complete
174175
{{if IsNSeriesSKU .}}
175176
- . /opt/azure/containers/provision_source.sh
176177
{{GetGPUDriversInstallScript .}}
177178
{{end}}
178-
- mkdir -p /var/log/azure && touch /var/log/azure/cloud-init.complete
179179
{{end}}

parts/k8s/kubernetescustomscript.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ function installDocker() {
197197
apt_get_install 20 30 120 docker-engine || exit $ERR_DOCKER_INSTALL_TIMEOUT
198198
echo "ExecStartPost=/sbin/iptables -P FORWARD ACCEPT" >> /etc/systemd/system/docker.service.d/exec_start.conf
199199
usermod -aG docker ${ADMINUSER}
200+
touch /var/log/azure/docker-install.complete
200201
}
201202

202203
function runAptDaily() {

pkg/acsengine/engine.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,7 @@ func getGPUDriversInstallScript(profile *api.AgentPoolProfile) string {
472472
- sh -c "echo \"blacklist nouveau\" >> /etc/modprobe.d/blacklist.conf"
473473
- update-initramfs -u
474474
- mkdir -p %s
475+
- wait_for_file 900 1 /var/log/azure/docker-install.complete
475476
- cd %s`, dest, dest)
476477

477478
/*
@@ -507,7 +508,7 @@ func getGPUDriversInstallScript(profile *api.AgentPoolProfile) string {
507508
- sh nvidia-drivers-%s --silent --accept-license --no-drm --utility-prefix="%s" --opengl-prefix="%s"
508509
- echo "%s" > /etc/ld.so.conf.d/nvidia.conf
509510
- sudo ldconfig
510-
- umount /usr/lib/x86_64-linux-gnu
511+
- umount -l /usr/lib/x86_64-linux-gnu
511512
- nvidia-modprobe -u -c0
512513
- %s/bin/nvidia-smi
513514
- sudo ldconfig

0 commit comments

Comments
 (0)