mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Use AR images on the domain pkg.dev.
Use pkg.dev consistently since GCR is deprecated. We don't have to manage mirrored image repos for gcr.io and pkg.dev. PiperOrigin-RevId: 695791369
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
load("//tools:defs.bzl", "proto_library")
|
||||
load("//tools:defs.bzl", "go_library", "proto_library")
|
||||
|
||||
package(
|
||||
default_applicable_licenses = ["//:license"],
|
||||
@@ -16,3 +16,11 @@ proto_library(
|
||||
"@com_google_protobuf//:any_proto",
|
||||
],
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "kubernetes",
|
||||
srcs = ["helpers.go"],
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -14,6 +14,7 @@ go_test(
|
||||
"notap",
|
||||
],
|
||||
deps = [
|
||||
"//test/kubernetes",
|
||||
"//test/kubernetes/benchmarks/profiling",
|
||||
"//test/kubernetes/benchmetric",
|
||||
"//test/kubernetes/k8sctx",
|
||||
@@ -49,6 +50,7 @@ go_test(
|
||||
"notap",
|
||||
],
|
||||
deps = [
|
||||
"//test/kubernetes",
|
||||
"//test/kubernetes/benchmarks/profiling",
|
||||
"//test/kubernetes/benchmetric",
|
||||
"//test/kubernetes/k8sctx",
|
||||
@@ -68,6 +70,7 @@ go_test(
|
||||
],
|
||||
deps = [
|
||||
"//test/benchmarks/tools",
|
||||
"//test/kubernetes",
|
||||
"//test/kubernetes/benchmarks/profiling",
|
||||
"//test/kubernetes/benchmetric",
|
||||
"//test/kubernetes/k8sctx",
|
||||
@@ -86,6 +89,7 @@ go_test(
|
||||
"notap",
|
||||
],
|
||||
deps = [
|
||||
"//test/kubernetes",
|
||||
"//test/kubernetes/benchmarks/profiling",
|
||||
"//test/kubernetes/benchmetric",
|
||||
"//test/kubernetes/k8sctx",
|
||||
@@ -104,6 +108,7 @@ go_test(
|
||||
"notap",
|
||||
],
|
||||
deps = [
|
||||
"//test/kubernetes",
|
||||
"//test/kubernetes/benchmarks/profiling",
|
||||
"//test/kubernetes/benchmetric",
|
||||
"//test/kubernetes/k8sctx",
|
||||
@@ -122,6 +127,7 @@ go_test(
|
||||
"notap",
|
||||
],
|
||||
deps = [
|
||||
"//test/kubernetes",
|
||||
"//test/kubernetes/benchmarks/httpbench",
|
||||
"//test/kubernetes/benchmarks/profiling",
|
||||
"//test/kubernetes/k8sctx",
|
||||
@@ -159,6 +165,7 @@ go_test(
|
||||
"notap",
|
||||
],
|
||||
deps = [
|
||||
"//test/kubernetes",
|
||||
"//test/kubernetes/benchmarks/profiling",
|
||||
"//test/kubernetes/benchmetric",
|
||||
"//test/kubernetes/k8sctx",
|
||||
@@ -196,6 +203,7 @@ go_test(
|
||||
"notap",
|
||||
],
|
||||
deps = [
|
||||
"//test/kubernetes",
|
||||
"//test/kubernetes/benchmarks/profiling",
|
||||
"//test/kubernetes/benchmetric",
|
||||
"//test/kubernetes/k8sctx",
|
||||
@@ -217,6 +225,7 @@ go_test(
|
||||
],
|
||||
deps = [
|
||||
"//test/gpu/ollama",
|
||||
"//test/kubernetes",
|
||||
"//test/kubernetes/benchmetric",
|
||||
"//test/kubernetes/k8sctx",
|
||||
"//test/kubernetes/testcluster",
|
||||
@@ -237,6 +246,7 @@ go_test(
|
||||
],
|
||||
deps = [
|
||||
"//test/gpu/stablediffusion",
|
||||
"//test/kubernetes",
|
||||
"//test/kubernetes/benchmetric",
|
||||
"//test/kubernetes/k8sctx",
|
||||
"//test/kubernetes/testcluster",
|
||||
|
||||
@@ -21,6 +21,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
k8s "gvisor.dev/gvisor/test/kubernetes"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmarks/profiling"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmetric"
|
||||
"gvisor.dev/gvisor/test/kubernetes/k8sctx"
|
||||
@@ -30,7 +31,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
imageAMD = "gcr.io/gvisor-presubmit/benchmarks/absl_x86_64:latest"
|
||||
imageAMD = k8s.ImageRepoPrefix + "benchmarks/absl_x86_64:latest"
|
||||
)
|
||||
|
||||
// TestABSLBuild benchmarks building various Abseil C++ targets.
|
||||
|
||||
@@ -20,6 +20,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
k8s "gvisor.dev/gvisor/test/kubernetes"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmarks/profiling"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmetric"
|
||||
"gvisor.dev/gvisor/test/kubernetes/k8sctx"
|
||||
@@ -29,9 +30,9 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
imageAMD = "gcr.io/gvisor-presubmit/benchmarks/ffmpeg_x86_64:latest"
|
||||
imageARM = "gcr.io/gvisor-presubmit/benchmarks/ffmpeg_aarch64:latest"
|
||||
ffmpegContainerName = "ffmpeg"
|
||||
imageAMD = k8s.ImageRepoPrefix + "benchmarks/ffmpeg_x86_64:latest"
|
||||
imageARM = k8s.ImageRepoPrefix + "benchmarks/ffmpeg_aarch64:latest"
|
||||
)
|
||||
|
||||
func TestFfmpeg(t *testing.T) {
|
||||
|
||||
@@ -21,6 +21,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
k8s "gvisor.dev/gvisor/test/kubernetes"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmarks/profiling"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmetric"
|
||||
"gvisor.dev/gvisor/test/kubernetes/k8sctx"
|
||||
@@ -30,8 +31,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
imageAMD = "gcr.io/gvisor-presubmit/benchmarks/build-grpc_x86_64:latest"
|
||||
imageARM = "gcr.io/gvisor-presubmit/benchmarks/build-grpc_aarch64:latest"
|
||||
imageAMD = k8s.ImageRepoPrefix + "benchmarks/build-grpc_x86_64:latest"
|
||||
imageARM = k8s.ImageRepoPrefix + "benchmarks/build-grpc_aarch64:latest"
|
||||
)
|
||||
|
||||
func TestGRPCBuild(t *testing.T) {
|
||||
|
||||
@@ -14,6 +14,7 @@ go_library(
|
||||
"//test/kubernetes/benchmarks:__subpackages__",
|
||||
],
|
||||
deps = [
|
||||
"//test/kubernetes",
|
||||
"//test/kubernetes/benchmetric",
|
||||
"//test/kubernetes/testcluster",
|
||||
"@io_k8s_api//core/v1:go_default_library",
|
||||
|
||||
@@ -25,6 +25,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
k8s "gvisor.dev/gvisor/test/kubernetes"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmetric"
|
||||
"gvisor.dev/gvisor/test/kubernetes/testcluster"
|
||||
v13 "k8s.io/api/core/v1"
|
||||
@@ -37,7 +38,7 @@ import (
|
||||
// the HTTP server with load on a single connection.
|
||||
const InfiniteQPS = 1 << 16
|
||||
|
||||
const wrk2ImageAMD = "gcr.io/gvisor-presubmit/benchmarks/wrk2_x86_64:latest"
|
||||
const wrk2ImageAMD = k8s.ImageRepoPrefix + "benchmarks/wrk2_x86_64:latest"
|
||||
|
||||
// MetricType is a type of metric to report.
|
||||
type MetricType int
|
||||
|
||||
@@ -21,6 +21,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
k8s "gvisor.dev/gvisor/test/kubernetes"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmarks/httpbench"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmarks/profiling"
|
||||
"gvisor.dev/gvisor/test/kubernetes/k8sctx"
|
||||
@@ -31,8 +32,6 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
nginxImageAMD = "gcr.io/gvisor-presubmit/benchmarks/nginx_x86_64:latest"
|
||||
nginxImageARM = "gcr.io/gvisor-presubmit/benchmarks/nginx_aarch64:latest"
|
||||
nginxPort = 80
|
||||
nginxBenchmarkDuration = 70 * time.Second
|
||||
nginxRequestTimeout = 3 * time.Second
|
||||
@@ -40,6 +39,8 @@ const (
|
||||
|
||||
nginxServerLabelKey = "app.kubernetes.io/name"
|
||||
nginxServerLabelValue = "nginx-server"
|
||||
nginxImageAMD = k8s.ImageRepoPrefix + "benchmarks/nginx_x86_64:latest"
|
||||
nginxImageARM = k8s.ImageRepoPrefix + "benchmarks/nginx_aarch64:latest"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -28,6 +28,7 @@ import (
|
||||
"unicode"
|
||||
|
||||
"gvisor.dev/gvisor/test/gpu/ollama"
|
||||
k8s "gvisor.dev/gvisor/test/kubernetes"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmetric"
|
||||
"gvisor.dev/gvisor/test/kubernetes/k8sctx"
|
||||
"gvisor.dev/gvisor/test/kubernetes/testcluster"
|
||||
@@ -816,11 +817,11 @@ func doOllamaTest(ctx context.Context, t *testing.T, k8sCtx k8sctx.KubernetesCon
|
||||
const (
|
||||
ollamaServerLabelKey = "app.kubernetes.io/name"
|
||||
ollamaServerLabelValue = "ollama-server"
|
||||
ollamaBenchImage = "gcr.io/gvisor-presubmit/benchmarks/gpu/ollama/bench:latest"
|
||||
ollamaBenchClientImage = "gcr.io/gvisor-presubmit/benchmarks/gpu/ollama/client:latest"
|
||||
ollamaPort = 11434
|
||||
ollamaPodName = "ollama-server"
|
||||
ollamaServiceName = "ollama-service"
|
||||
ollamaBenchImage = k8s.ImageRepoPrefix + "benchmarks/gpu/ollama/bench:latest"
|
||||
ollamaBenchClientImage = k8s.ImageRepoPrefix + "benchmarks/gpu/ollama/client:latest"
|
||||
)
|
||||
|
||||
// newOllamaServerPod returns the pod spec for an ollama server.
|
||||
|
||||
@@ -16,6 +16,7 @@ go_library(
|
||||
deps = [
|
||||
"//pkg/atomicbitops",
|
||||
"//runsc/flag",
|
||||
"//test/kubernetes",
|
||||
"//test/kubernetes/testcluster",
|
||||
"//test/metricsviz",
|
||||
"@com_github_google_pprof//profile:go_default_library",
|
||||
|
||||
@@ -42,6 +42,7 @@ import (
|
||||
"google.golang.org/protobuf/proto"
|
||||
"gvisor.dev/gvisor/pkg/atomicbitops"
|
||||
"gvisor.dev/gvisor/runsc/flag"
|
||||
k8s "gvisor.dev/gvisor/test/kubernetes"
|
||||
"gvisor.dev/gvisor/test/kubernetes/testcluster"
|
||||
"gvisor.dev/gvisor/test/metricsviz"
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
@@ -61,10 +62,10 @@ var (
|
||||
|
||||
const (
|
||||
setupPodName = "runsc-profiling-setup"
|
||||
profileHelperImageAMD64 = "gcr.io/gvisor-presubmit/benchmarks/profile-helper_x86_64:latest"
|
||||
profileHelperImageARM64 = "gcr.io/gvisor-presubmit/benchmarks/profile-helper_aarch64:latest"
|
||||
k8sApp = "k8s-app"
|
||||
hostMountDir = "/host"
|
||||
profileHelperImageAMD64 = k8s.ImageRepoPrefix + "benchmarks/profile-helper_x86_64:latest"
|
||||
profileHelperImageARM64 = k8s.ImageRepoPrefix + "benchmarks/profile-helper_aarch64:latest"
|
||||
)
|
||||
|
||||
// postProcessor is a function that is called after a profiling run completes.
|
||||
|
||||
@@ -34,6 +34,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
k8s "gvisor.dev/gvisor/test/kubernetes"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmarks/profiling"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmetric"
|
||||
"gvisor.dev/gvisor/test/kubernetes/k8sctx"
|
||||
@@ -42,16 +43,14 @@ import (
|
||||
v13 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
const (
|
||||
pytorchImage = "gcr.io/gvisor-presubmit/benchmarks/pytorch_x86_64:f6f280aeb1b07989"
|
||||
)
|
||||
|
||||
// pytorchTestType is the method used, either training or evaluation, for the model.
|
||||
type pytorchTestType string
|
||||
|
||||
const (
|
||||
train = pytorchTestType("train")
|
||||
eval = pytorchTestType("eval")
|
||||
|
||||
pytorchImage = k8s.ImageRepoPrefix + "benchmarks/pytorch_x86_64:f6f280aeb1b07989"
|
||||
)
|
||||
|
||||
type pytorchMode string
|
||||
|
||||
@@ -27,6 +27,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
k8s "gvisor.dev/gvisor/test/kubernetes"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmarks/profiling"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmetric"
|
||||
"gvisor.dev/gvisor/test/kubernetes/k8sctx"
|
||||
@@ -39,12 +40,12 @@ const (
|
||||
redisPort = 6379
|
||||
defaultRequestsPerConnection = 50000
|
||||
|
||||
redisImageAMD = "gcr.io/gvisor-presubmit/benchmarks/redis_x86_64:latest"
|
||||
redisImageARM = "gcr.io/gvisor-presubmit/benchmarks/redis_aarch64:latest"
|
||||
redisServerLabelKey = "app.kubernetes.io/name"
|
||||
redisServerLabelValue = "redis-server"
|
||||
redisVolumeName = "redis-data"
|
||||
redisDataDirectory = "/redis-data"
|
||||
redisImageAMD = k8s.ImageRepoPrefix + "benchmarks/redis_x86_64:latest"
|
||||
redisImageARM = k8s.ImageRepoPrefix + "benchmarks/redis_aarch64:latest"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -25,6 +25,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"gvisor.dev/gvisor/test/benchmarks/tools"
|
||||
k8s "gvisor.dev/gvisor/test/kubernetes"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmarks/profiling"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmetric"
|
||||
"gvisor.dev/gvisor/test/kubernetes/k8sctx"
|
||||
@@ -34,9 +35,9 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
imageAMD = "gcr.io/gvisor-presubmit/benchmarks/rubydev_x86_64:latest"
|
||||
imageARM = "gcr.io/gvisor-presubmit/benchmarks/rubydev_aarch64:latest"
|
||||
builderContainerName = "builder"
|
||||
imageAMD = k8s.ImageRepoPrefix + "benchmarks/rubydev_x86_64:latest"
|
||||
imageARM = k8s.ImageRepoPrefix + "benchmarks/rubydev_aarch64:latest"
|
||||
)
|
||||
|
||||
// TestRubyDev benchmarks a build job on k8s clusters.
|
||||
|
||||
@@ -23,6 +23,7 @@ import (
|
||||
"time"
|
||||
|
||||
"gvisor.dev/gvisor/test/gpu/stablediffusion"
|
||||
k8s "gvisor.dev/gvisor/test/kubernetes"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmetric"
|
||||
"gvisor.dev/gvisor/test/kubernetes/k8sctx"
|
||||
"gvisor.dev/gvisor/test/kubernetes/testcluster"
|
||||
@@ -32,7 +33,7 @@ import (
|
||||
|
||||
const (
|
||||
// Container image for Stable Diffusion XL.
|
||||
stableDiffusionImage = "gcr.io/gvisor-presubmit/gpu/stable-diffusion-xl"
|
||||
stableDiffusionImage = k8s.ImageRepoPrefix + "gpu/stable-diffusion-xl"
|
||||
)
|
||||
|
||||
func TestStableDiffusionXL(t *testing.T) {
|
||||
|
||||
@@ -21,6 +21,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
k8s "gvisor.dev/gvisor/test/kubernetes"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmarks/profiling"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmetric"
|
||||
"gvisor.dev/gvisor/test/kubernetes/k8sctx"
|
||||
@@ -30,8 +31,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
imageAMD = "gcr.io/gvisor-presubmit/benchmarks/tensorflow_x86_64:latest"
|
||||
imageARM = "gcr.io/gvisor-presubmit/benchmarks/tensorflow_aarch64:latest"
|
||||
imageAMD = k8s.ImageRepoPrefix + "benchmarks/tensorflow_x86_64:latest"
|
||||
imageARM = k8s.ImageRepoPrefix + "benchmarks/tensorflow_aarch64:latest"
|
||||
)
|
||||
|
||||
var workloads = map[string]string{
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
// Copyright 2024 The gVisor Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Package kubernetes contains utilities for gVisor tests.
|
||||
package kubernetes
|
||||
|
||||
// ImageRepoPrefix is the image repository prefix of images that are
|
||||
// used by gVisor tests.
|
||||
const ImageRepoPrefix = "us-central1-docker.pkg.dev/gvisor-presubmit/"
|
||||
Reference in New Issue
Block a user