Skip to content

Commit

Permalink
pass golang version as docker build arg and bump version to 1.22.8
Browse files Browse the repository at this point in the history
Signed-off-by: Tariq Ibrahim <[email protected]>
  • Loading branch information
tariq1890 committed Oct 16, 2024
1 parent f547761 commit f01fd28
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ $(DRIVER_BUILD_TARGETS):
$(DOCKER_BUILD_PLATFORM_OPTIONS) \
--tag $(IMAGE) \
--build-arg DRIVER_VERSION="$(DRIVER_VERSION)" \
--build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \
--build-arg DRIVER_BRANCH="$(DRIVER_BRANCH)" \
--build-arg CUDA_VERSION="$(CUDA_VERSION)" \
--build-arg CVE_UPDATES="$(CVE_UPDATES)" \
Expand Down Expand Up @@ -186,6 +187,7 @@ $(BASE_BUILD_TARGETS):
--tag $(IMAGE) \
--target $(TARGET) \
--build-arg CUDA_VERSION="$(CUDA_VERSION)" \
--build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \
--build-arg DRIVER_BRANCH="$(DRIVER_BRANCH)" \
--build-arg KERNEL_FLAVOR="$(KERNEL_FLAVOR)" \
--file $(DOCKERFILE) \
Expand Down
3 changes: 1 addition & 2 deletions rhel8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ SHELL ["/bin/bash", "-c"]

RUN dnf install -y git wget

ENV GOLANG_VERSION=1.22.7

# download appropriate binary based on the target architecture for multi-arch builds
RUN OS_ARCH=${TARGETARCH/x86_64/amd64} && OS_ARCH=${OS_ARCH/aarch64/arm64} && \
curl https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${OS_ARCH}.tar.gz \
Expand All @@ -33,6 +31,7 @@ SHELL ["/bin/bash", "-c"]
ARG BASE_URL=https://us.download.nvidia.com/tesla
ARG DRIVER_VERSION
ENV DRIVER_VERSION=$DRIVER_VERSION
ARG GOLANG_VERSION

# Arg to indicate if driver type is either of passthrough/baremetal or vgpu
ARG DRIVER_TYPE=passthrough
Expand Down
3 changes: 1 addition & 2 deletions rhel9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ SHELL ["/bin/bash", "-c"]

RUN dnf install -y git wget

ENV GOLANG_VERSION=1.22.7

# download appropriate binary based on the target architecture for multi-arch builds
RUN OS_ARCH=${TARGETARCH/x86_64/amd64} && OS_ARCH=${OS_ARCH/aarch64/arm64} && \
curl https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${OS_ARCH}.tar.gz \
Expand All @@ -33,6 +31,7 @@ SHELL ["/bin/bash", "-c"]
ARG BASE_URL=https://us.download.nvidia.com/tesla
ARG DRIVER_VERSION
ENV DRIVER_VERSION=$DRIVER_VERSION
ARG GOLANG_VERSION

# Arg to indicate if driver type is either of passthrough/baremetal or vgpu
ARG DRIVER_TYPE=passthrough
Expand Down
3 changes: 1 addition & 2 deletions ubuntu20.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
git && \
rm -rf /var/lib/apt/lists/*

ENV GOLANG_VERSION=1.22.7

# download appropriate binary based on the target architecture for multi-arch builds
RUN OS_ARCH=${TARGETARCH/x86_64/amd64} && OS_ARCH=${OS_ARCH/aarch64/arm64} && \
curl https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${OS_ARCH}.tar.gz \
Expand All @@ -41,6 +39,7 @@ ARG BASE_URL=https://us.download.nvidia.com/tesla
ARG TARGETARCH
ENV TARGETARCH=$TARGETARCH
ARG DRIVER_VERSION
ARG GOLANG_VERSION
ENV DRIVER_VERSION=$DRIVER_VERSION
ENV DEBIAN_FRONTEND=noninteractive

Expand Down
3 changes: 1 addition & 2 deletions ubuntu22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
git && \
rm -rf /var/lib/apt/lists/*

ENV GOLANG_VERSION=1.22.7

# download appropriate binary based on the target architecture for multi-arch builds
RUN OS_ARCH=${TARGETARCH/x86_64/amd64} && OS_ARCH=${OS_ARCH/aarch64/arm64} && \
curl https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${OS_ARCH}.tar.gz \
Expand All @@ -41,6 +39,7 @@ ARG BASE_URL=https://us.download.nvidia.com/tesla
ARG TARGETARCH
ENV TARGETARCH=$TARGETARCH
ARG DRIVER_VERSION
ARG GOLANG_VERSION
ENV DRIVER_VERSION=$DRIVER_VERSION
ENV DEBIAN_FRONTEND=noninteractive

Expand Down
2 changes: 2 additions & 0 deletions versions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@
DRIVER_VERSIONS ?= 535.183.06 550.90.12 560.35.03

CUDA_VERSION := 12.6.0

GOLANG_VERSION := 1.22.8

0 comments on commit f01fd28

Please sign in to comment.