Skip to content
This repository has been archived by the owner on Oct 27, 2023. It is now read-only.

Commit

Permalink
Simplify building of the meta-packages
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Lezar <[email protected]>
  • Loading branch information
elezar committed Apr 25, 2023
1 parent 68b81a2 commit 61f33cb
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 288 deletions.
6 changes: 3 additions & 3 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ Build-Depends: debhelper (>= 9)
Package: nvidia-container-runtime
Architecture: all
Depends: ${misc:Depends}, nvidia-container-toolkit (>= @TOOLKIT_VERSION@), nvidia-container-toolkit (<< 2.0.0)
Description: NVIDIA container runtime
Provides a modified version of runc allowing users to run GPU enabled
containers.
Description: NVIDIA Container Toolkit meta-package
A meta-package that allows installation flows expecting the nvidia-container-runtime
to be migrated to installing the NVIDIA Container Toolkit packages directly.
40 changes: 0 additions & 40 deletions docker/Dockerfile.amazonlinux

This file was deleted.

14 changes: 5 additions & 9 deletions docker/Dockerfile.ubuntu → docker/Dockerfile.deb
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
ARG BASEIMAGE
FROM ${BASEIMAGE}

# packaging dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
ca-certificates \
git \
build-essential \
dh-make \
fakeroot \
build-essential \
devscripts \
lsb-release && \
rm -rf /var/lib/apt/lists/*

RUN apt-get update && \
apt-get install -y curl && \
rm -rf /var/lib/apt/lists/*

# packaging
ARG PKG_NAME
ARG PKG_VERS
ARG PKG_REV
ARG TOOLKIT_VERSION
ARG DOCKER_VERSION

ENV DEBFULLNAME "NVIDIA CORPORATION"
ENV DEBEMAIL "[email protected]"
ENV PKG_NAME "${PKG_NAME}"
ENV REVISION "$PKG_VERS-$PKG_REV"
ENV DOCKER_VERSION $DOCKER_VERSION
ENV TOOLKIT_VERSION $TOOLKIT_VERSION
ENV SECTION ""

Expand All @@ -45,5 +41,5 @@ RUN sed -i "s;@TOOLKIT_VERSION@;${TOOLKIT_VERSION};" debian/control && \
if [ "$REVISION" != "$(dpkg-parsechangelog --show-field=Version)" ]; then exit 1; fi

CMD export DISTRIB="$(lsb_release -cs)" && \
debuild -eREVISION -eDISTRIB -eSECTION --dpkg-buildpackage-hook='sh debian/prepare' -i -us -uc -b && \
debuild --preserve-env --dpkg-buildpackage-hook='sh debian/prepare' -i -us -uc -b && \
mv /tmp/*.deb /dist
53 changes: 0 additions & 53 deletions docker/Dockerfile.debian

This file was deleted.

40 changes: 0 additions & 40 deletions docker/Dockerfile.opensuse-leap

This file was deleted.

12 changes: 5 additions & 7 deletions docker/Dockerfile.centos → docker/Dockerfile.rpm
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
ARG BASEIMAGE
FROM ${BASEIMAGE}

# packaging dependencies
RUN yum install -y \
ca-certificates \
wget \
git \
make \
rpm-build && \
rm -rf /var/cache/yum/*

Expand All @@ -14,10 +11,12 @@ ARG PKG_NAME
ARG PKG_VERS
ARG PKG_REV
ARG TOOLKIT_VERSION
ARG DOCKER_VERSION

ENV PKG_NAME "${PKG_NAME}"
ENV VERSION $PKG_VERS
ENV RELEASE $PKG_REV
ENV DOCKER_VERSION $DOCKER_VERSION
ENV TOOLKIT_VERSION $TOOLKIT_VERSION

# output directory
Expand All @@ -27,12 +26,11 @@ RUN mkdir -p $DIST_DIR /dist
WORKDIR $DIST_DIR/..
COPY rpm .

CMD arch=$(uname -m) && \
rpmbuild --clean -bb \
CMD rpmbuild --clean -bb \
-D "_topdir $PWD" \
-D "release_date $(date +'%a %b %d %Y')" \
-D "version $VERSION" \
-D "release $RELEASE" \
-D "toolkit_version $TOOLKIT_VERSION" \
SPECS/${PKG_NAME}.spec && \
SPECS/nvidia-container-runtime.spec && \
mv RPMS/noarch/*.rpm /dist
Loading

0 comments on commit 61f33cb

Please sign in to comment.