Merge pull request #868 from elezar/docker-file-fixes
Some checks failed
CodeQL / Analyze Go code with CodeQL (push) Has been cancelled
Golang / check (push) Has been cancelled
Golang / Unit test (push) Has been cancelled
Golang / Build (push) Has been cancelled
image / packages (${{github.event_name == 'pull_request'}}, centos7-aarch64) (push) Has been cancelled
image / packages (${{github.event_name == 'pull_request'}}, centos7-x86_64) (push) Has been cancelled
image / packages (${{github.event_name == 'pull_request'}}, centos8-ppc64le) (push) Has been cancelled
image / packages (${{github.event_name == 'pull_request'}}, ubuntu18.04-amd64) (push) Has been cancelled
image / packages (${{github.event_name == 'pull_request'}}, ubuntu18.04-arm64) (push) Has been cancelled
image / packages (${{github.event_name == 'pull_request'}}, ubuntu18.04-ppc64le) (push) Has been cancelled
image / image (packaging, ${{github.event_name == 'pull_request'}}) (push) Has been cancelled
image / image (ubi8, ${{github.event_name == 'pull_request'}}) (push) Has been cancelled
image / image (ubuntu20.04, ${{github.event_name == 'pull_request'}}) (push) Has been cancelled

[no-relnote] Fix Dockerfile lint issues
This commit is contained in:
Evan Lezar 2025-01-20 14:21:22 +01:00 committed by GitHub
commit d75b1adeda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 8 deletions

View File

@ -15,7 +15,7 @@
ARG GOLANG_VERSION=x.x.x ARG GOLANG_VERSION=x.x.x
ARG VERSION="N/A" ARG VERSION="N/A"
FROM nvidia/cuda:12.6.3-base-ubi8 as build FROM nvidia/cuda:12.6.3-base-ubi8 AS build
RUN yum install -y \ RUN yum install -y \
wget make git gcc \ wget make git gcc \
@ -36,8 +36,8 @@ RUN set -eux; \
| tar -C /usr/local -xz | tar -C /usr/local -xz
ENV GOPATH /go ENV GOPATH=/go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
WORKDIR /build WORKDIR /build
COPY . . COPY . .
@ -62,7 +62,8 @@ WORKDIR /artifacts/packages
ARG PACKAGE_VERSION ARG PACKAGE_VERSION
ARG TARGETARCH ARG TARGETARCH
ENV PACKAGE_ARCH ${TARGETARCH} ENV PACKAGE_ARCH=${TARGETARCH}
RUN PACKAGE_ARCH=${PACKAGE_ARCH/amd64/x86_64} && PACKAGE_ARCH=${PACKAGE_ARCH/arm64/aarch64} && \ RUN PACKAGE_ARCH=${PACKAGE_ARCH/amd64/x86_64} && PACKAGE_ARCH=${PACKAGE_ARCH/arm64/aarch64} && \
yum localinstall -y \ yum localinstall -y \
${PACKAGE_DIST}/${PACKAGE_ARCH}/libnvidia-container1-1.*.rpm \ ${PACKAGE_DIST}/${PACKAGE_ARCH}/libnvidia-container1-1.*.rpm \
@ -75,6 +76,7 @@ COPY --from=build /artifacts/bin /work
ENV PATH=/work:$PATH ENV PATH=/work:$PATH
ARG VERSION
LABEL io.k8s.display-name="NVIDIA Container Runtime Config" LABEL io.k8s.display-name="NVIDIA Container Runtime Config"
LABEL name="NVIDIA Container Runtime Config" LABEL name="NVIDIA Container Runtime Config"
LABEL vendor="NVIDIA" LABEL vendor="NVIDIA"

View File

@ -15,7 +15,7 @@
ARG GOLANG_VERSION=x.x.x ARG GOLANG_VERSION=x.x.x
ARG VERSION="N/A" ARG VERSION="N/A"
FROM nvidia/cuda:12.6.3-base-ubuntu20.04 as build FROM nvidia/cuda:12.6.3-base-ubuntu20.04 AS build
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y wget make git gcc \ apt-get install -y wget make git gcc \
@ -35,8 +35,8 @@ RUN set -eux; \
wget -nv -O - https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz \ wget -nv -O - https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz \
| tar -C /usr/local -xz | tar -C /usr/local -xz
ENV GOPATH /go ENV GOPATH=/go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
WORKDIR /build WORKDIR /build
COPY . . COPY . .
@ -71,7 +71,7 @@ WORKDIR /artifacts/packages
ARG PACKAGE_VERSION ARG PACKAGE_VERSION
ARG TARGETARCH ARG TARGETARCH
ENV PACKAGE_ARCH ${TARGETARCH} ENV PACKAGE_ARCH=${TARGETARCH}
RUN dpkg -i \ RUN dpkg -i \
${PACKAGE_DIST}/${PACKAGE_ARCH}/libnvidia-container1_1.*.deb \ ${PACKAGE_DIST}/${PACKAGE_ARCH}/libnvidia-container1_1.*.deb \
@ -84,6 +84,7 @@ COPY --from=build /artifacts/bin /work/
ENV PATH=/work:$PATH ENV PATH=/work:$PATH
ARG VERSION
LABEL io.k8s.display-name="NVIDIA Container Runtime Config" LABEL io.k8s.display-name="NVIDIA Container Runtime Config"
LABEL name="NVIDIA Container Runtime Config" LABEL name="NVIDIA Container Runtime Config"
LABEL vendor="NVIDIA" LABEL vendor="NVIDIA"