File tree Expand file tree Collapse file tree 4 files changed +67
-8
lines changed
Expand file tree Collapse file tree 4 files changed +67
-8
lines changed Original file line number Diff line number Diff line change @@ -113,4 +113,59 @@ Dryrun environment holodeck 🔍
113113✔ Checking if image ami-0fe8bec493a81c7da is supported in region eu-north-1
114114✔ Resolving dependencies 📦
115115Dryrun succeeded 🎉
116- ` ` `
116+ ` ` `
117+
118+ # # Supported Cuda-Drivers
119+
120+ Supported Nvidia drivers are:
121+
122+ ` ` ` yaml
123+ nvidiaDriver:
124+ install: true
125+ version: < version>
126+ ` ` `
127+ Where ` < version> ` can be a prefix of any package version. The following are example package versions:
128+
129+ - 570.86.15-0ubuntu1
130+ - 570.86.10-0ubuntu1
131+ - 565.57.01-0ubuntu1
132+ - 560.35.05-0ubuntu1
133+ - 560.35.03-1
134+ - 560.28.03-1
135+ - 555.42.06-1
136+ - 555.42.02-1
137+ - 550.144.03-0ubuntu1
138+ - 550.127.08-0ubuntu1
139+ - 550.127.05-0ubuntu1
140+ - 550.90.12-0ubuntu1
141+ - 550.90.07-1
142+ - 550.54.15-1
143+ - 550.54.14-1
144+ - 545.23.08-1
145+ - 545.23.06-1
146+ - 535.230.02-0ubuntu1
147+ - 535.216.03-0ubuntu1
148+ - 535.216.01-0ubuntu1
149+ - 535.183.06-1
150+ - 535.183.01-1
151+ - 535.161.08-1
152+ - 535.161.07-1
153+ - 535.154.05-1
154+ - 535.129.03-1
155+ - 535.104.12-1
156+ - 535.104.05-1
157+ - 535.86.10-1
158+ - 535.54.03-1
159+ - 530.30.02-1
160+ - 525.147.05-1
161+ - 525.125.06-1
162+ - 525.105.17-1
163+ - 525.85.12-1
164+ - 525.60.13-1
165+ - 520.61.05-1
166+ - 515.105.01-1
167+ - 515.86.01-1
168+ - 515.65.07-1
169+ - 515.65.01-1
170+ - 515.48.07-1
171+ - 515.43.04-1
Original file line number Diff line number Diff line change 5050type ProvisionFunc func (tpl * bytes.Buffer , env v1alpha1.Environment ) error
5151
5252func nvdriver (tpl * bytes.Buffer , env v1alpha1.Environment ) error {
53- nvdriver := templates .NewNvDriver ()
53+ nvdriver := templates .NewNvDriver (env )
5454 return nvdriver .Execute (tpl , env )
5555}
5656
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ install_packages_with_retry() {
3838 echo "Attempt $i to install packages: ${packages[@]}"
3939
4040 # Attempt to install packages
41- sudo apt-get install -y "${packages[@]}"
41+ sudo apt-get install -y --no-install-recommends "${packages[@]}"
4242
4343 # Check if the last command failed and the error is related to unsigned repository
4444 if [ $? -ne 0 ] && grep -q 'NO_PUBKEY' <<< "$(tail -n 1 /var/lib/dpkg/status 2>/dev/null)"; then
Original file line number Diff line number Diff line change @@ -34,21 +34,25 @@ wget https://developer.download.nvidia.com/compute/cuda/repos/$distribution/x86_
3434sudo dpkg -i cuda-keyring_1.1-1_all.deb
3535
3636with_retry 3 10s sudo apt-get update
37- install_packages_with_retry cuda-drivers
37+ install_packages_with_retry cuda-drivers{{if .Version}}={{.Version}}{{end}}
3838
39- nvidia-smi -L
39+ nvidia-smi
4040`
4141
4242type NvDriver struct {
43+ // Version -- if specified -- indicates the version of the `cuda-drivers` package to install.
44+ Version string
4345}
4446
45- func NewNvDriver () * NvDriver {
46- return & NvDriver {}
47+ func NewNvDriver (env v1alpha1.Environment ) * NvDriver {
48+ return & NvDriver {
49+ Version : env .Spec .NVIDIADriver .Version ,
50+ }
4751}
4852
4953func (t * NvDriver ) Execute (tpl * bytes.Buffer , env v1alpha1.Environment ) error {
5054 nvDriverTemplate := template .Must (template .New ("nv-driver" ).Parse (NvDriverTemplate ))
51- err := nvDriverTemplate .Execute (tpl , & NvDriver {} )
55+ err := nvDriverTemplate .Execute (tpl , t )
5256 if err != nil {
5357 return fmt .Errorf ("failed to execute nv-driver template: %v" , err )
5458 }
You can’t perform that action at this time.
0 commit comments