Skip to content

Commit de2a62e

Browse files
committed
use auth to avoid docker hub rate limits
1 parent 63d2897 commit de2a62e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/compatgen/internal/cuda.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"strings"
99

1010
"github.com/anaskhan96/soup"
11+
"github.com/google/go-containerregistry/pkg/authn"
1112
"github.com/google/go-containerregistry/pkg/name"
1213
"github.com/google/go-containerregistry/pkg/v1/remote"
1314
"golang.org/x/sync/errgroup"
@@ -99,7 +100,7 @@ func parseCUDABaseImage(ctx context.Context, tag string) (*config.CUDABaseImage,
99100
return nil, fmt.Errorf("Failed to parse reference %s: %w", tag, err)
100101
}
101102

102-
img, err := remote.Image(ref, remote.WithContext(ctx))
103+
img, err := remote.Image(ref, remote.WithContext(ctx), remote.WithAuthFromKeychain(authn.DefaultKeychain))
103104
if err != nil {
104105
return nil, fmt.Errorf("Failed to get image %s: %w", tag, err)
105106
}

0 commit comments

Comments
 (0)