Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion ray-operator/test/support/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ const (
// KuberayTestRayImage is the Ray image to use for testing.
KuberayTestRayImage = "KUBERAY_TEST_RAY_IMAGE"

KuberayTestArch = "KUBERAY_TEST_ARCH"

KuberayTestUpgradeImage = "KUBERAY_TEST_UPGRADE_IMAGE"
)

Expand All @@ -29,7 +31,11 @@ func GetRayImage() string {
// detect if we are running on arm64 machine, most likely apple silicon
// the os name is not checked as it also possible that it might be linux
// also check if the image does not have the `-aarch64` suffix
if runtime.GOARCH == "arm64" && !strings.HasSuffix(rayImage, "-aarch64") {
arch := runtime.GOARCH
if archFromEnv := lookupEnvOrDefault(KuberayTestArch, ""); archFromEnv != "" {
arch = archFromEnv
}
if arch == "arm64" && !strings.HasSuffix(rayImage, "-aarch64") {
rayImage = rayImage + "-aarch64"
fmt.Printf("Modified Ray Image to: %s for ARM chips\n", rayImage)
}
Expand Down
Loading