Skip to content

Commit 89e310e

Browse files
committed
fix: failed to copy specific arch images
Signed-off-by: thxCode <[email protected]>
1 parent 18bd835 commit 89e310e

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

gpustack_runner/cmds/images.py

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -440,14 +440,14 @@ def check_result(f):
440440

441441
command = [
442442
"skopeo",
443-
"--override-os",
444-
override_os,
445-
"--override-arch",
446-
override_arch,
447443
"copy",
448444
"--src-tls-verify=false",
449445
"--retry-times",
450446
str(self.max_retries),
447+
"--override-os",
448+
override_os,
449+
"--override-arch",
450+
override_arch,
451451
]
452452
if self.source_username and self.source_password:
453453
command.extend(
@@ -767,17 +767,31 @@ def check_result(f):
767767
print(f"❌ Error syncing image '{img_name}'")
768768
failures.append((img_name, img_err))
769769

770+
override_os, override_arch = None, None
771+
if self.platform:
772+
override_os, override_arch = self.platform.split("/", maxsplit=1)
773+
770774
# Submit tasks
771775
for img in images:
772776
command = [
773777
"skopeo",
774778
"copy",
775779
"--src-tls-verify=false",
776780
"--dest-tls-verify=false",
777-
"--all",
778781
"--retry-times",
779782
str(self.max_retries),
780783
]
784+
if override_os and override_arch:
785+
command.extend(
786+
[
787+
"--override-os",
788+
override_os,
789+
"--override-arch",
790+
override_arch,
791+
],
792+
)
793+
else:
794+
command.append("--all")
781795
if self.source_username and self.source_password:
782796
command.extend(
783797
[

0 commit comments

Comments
 (0)