-
Notifications
You must be signed in to change notification settings - Fork 56
Description
Body:
## Description
When building the vGPU driver container using the official Dockerfile, I encountered the following error:
go: errors parsing go.mod:
/work/driver/vgpu/src/go.mod:3: invalid go version '1.22.2': must match format 1.23
The command '/bin/sh -c git clone https://github.com/NVIDIA/gpu-driver-container driver && cd driver/vgpu/src && go build -o vgpu-util && mv vgpu-util /work' returned a non-zero code: 1
## Steps to Reproduce
1. Dockerfile snippet:
```dockerfile
FROM registry.suse.com/bci/golang:1.17 as build
...
RUN git clone https://github.com/NVIDIA/gpu-driver-container driver && \
cd driver/vgpu/src && \
go build -o vgpu-util && \
mv vgpu-util /work
**DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/buildx/
Sending build context to Docker daemon 382.1MB
Step 1/40 : ARG SLES_VERSION
Step 2/40 : FROM nvcr.io/nvidia/cuda:12.8.1-base-ubi8 as license
---> ecd9f5957afc
Step 3/40 : FROM registry.suse.com/bci/golang:1.17 as build
---> 04c2c4b9e02a
Step 4/40 : RUN zypper --non-interactive install -y git wget tar gzip
---> Using cache
---> c1a4168df4d7
Step 5/40 : WORKDIR /work
---> Using cache
---> 4bf52149fedc
Step 6/40 : RUN git clone https://github.com/NVIDIA/gpu-driver-container driver && cd driver/vgpu/src && go build -o vgpu-util && mv vgpu-util /work
---> Running in 2d1969a9076d
Cloning into 'driver'...
go: errors parsing go.mod:
/work/driver/vgpu/src/go.mod:3: invalid go version '1.22.2': must match format 1.23
The command '/bin/sh -c git clone https://github.com/NVIDIA/gpu-driver-container driver && cd driver/vgpu/src && go build -o vgpu-util && mv vgpu-util /work' returned a non-zero code: 1**
- Build command:
docker build --build-arg SLES_VERSION=15.6 --build-arg DRIVER_VERSION=570.148.08 --build-arg DRIVER_ARCH=x86_64 --build-arg DRIVER_TYPE=vgpu -t nvidia-vgpu-driver:570.148.08 .
Expected Behavior
The build should complete successfully.
Actual Behavior
The build fails due to an incompatible Go version specified in go.mod.
Environment
- Docker version: 27.5.1-ce
- Base image: registry.suse.com/bci/golang:1.17
Suggestion
Please update the Go base image in the Dockerfile to a version that supports Go 1.22.x as specified in go.mod.
Thank you!