@@ -310,6 +310,24 @@ func run(cmd *cobra.Command, argv []string) error {
310310 return nil
311311 }
312312 log .Printf ("Image capabilities updated:\n %s" , string (output ))
313+ } else {
314+ // Add VM.GPU.A10.1 and VM.GPU.A10.2
315+ addList := []string {
316+ "VM.GPU.A10.1" ,
317+ "VM.GPU.A10.2" ,
318+ }
319+ for _ , machine := range addList {
320+ command = exec .Command ("oci" , "raw-request" , "--http-method" , "PUT" , "--target-uri" , "https://iaas.us-sanjose-1.oraclecloud.com/20160918/images/" + imageID + "/shapes/" + machine , "--request-body" , "{\" ocpuConstraints\" :{\" min\" :\" 1\" ,\" max\" :\" 80\" },\" memoryConstraints\" :{\" minInGBs\" :\" 1\" ,\" maxInGBs\" :\" 512\" },\" imageId\" :\" " + imageID + "\" ,\" shape\" :\" " + machine + "\" }" )
321+ output , err = command .CombinedOutput ()
322+ if err != nil {
323+ log .Print (command .String ())
324+ log .Printf ("OCI command failed. Output:\n %s" , string (output ))
325+ log .Fatal ("could not run command: " , err )
326+ exec .Command ("oci" , "compute" , "image" , "delete" , "--force" , "--image-id" , imageID )
327+ return nil
328+ }
329+ log .Printf ("%s compatibility added" , machine )
330+ }
313331 }
314332
315333 log .Println ("New Ubuntu 24.04 image created successfully." )
@@ -662,6 +680,19 @@ build {
662680
663681 // Remove chrome installation, there is no arm build from Google
664682 replacements [`"${path.root}/../scripts/build/install-google-chrome.sh",` ] = ``
683+ } else {
684+ replacements [`provisioner "shell" {
685+ execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
686+ script = "${path.root}/../scripts/build/list-dpkg.sh"
687+ }` ] = `provisioner "shell" {
688+ execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
689+ script = "${path.root}/../scripts/build/list-dpkg.sh"
690+ }
691+
692+ provisioner "shell" {
693+ execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
694+ inline = ["apt install -y ubuntu-drivers-common", "ubuntu-drivers install nvidia:570-server"]
695+ }`
665696 }
666697
667698 replacements [`"${path.root}/../scripts/build/install-actions-cache.sh",` ] = `"${path.root}/../scripts/build/install-actions-cache.sh",
0 commit comments