Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
Update nvidia-docker to use new runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
Renaud Gaubert committed Jul 22, 2019
1 parent cd0f1e3 commit 1269921
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 530 deletions.
3 changes: 0 additions & 3 deletions Dockerfile.amzn
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ RUN yum install -y \
# packaging
ARG PKG_VERS
ARG PKG_REV
ARG RUNTIME_VERSION
ARG DOCKER_VERSION

ENV VERSION $PKG_VERS
ENV RELEASE $PKG_REV
ENV RUNTIME_VERSION $RUNTIME_VERSION
ENV DOCKER_VERSION $DOCKER_VERSION

# output directory
Expand All @@ -31,7 +29,6 @@ CMD rpmbuild --clean -bb \
-D "_topdir $PWD" \
-D "version $VERSION" \
-D "release $RELEASE" \
-D "runtime_version $RUNTIME_VERSION" \
-D "docker_version $DOCKER_VERSION" \
SPECS/nvidia-docker2.spec && \
mv RPMS/noarch/*.rpm /dist
3 changes: 0 additions & 3 deletions Dockerfile.centos
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ RUN yum install -y \
# packaging
ARG PKG_VERS
ARG PKG_REV
ARG RUNTIME_VERSION
ARG DOCKER_VERSION

ENV VERSION $PKG_VERS
ENV RELEASE $PKG_REV
ENV RUNTIME_VERSION $RUNTIME_VERSION
ENV DOCKER_VERSION $DOCKER_VERSION

# output directory
Expand All @@ -31,7 +29,6 @@ CMD rpmbuild --clean -bb \
-D "_topdir $PWD" \
-D "version $VERSION" \
-D "release $RELEASE" \
-D "runtime_version $RUNTIME_VERSION" \
-D "docker_version $DOCKER_VERSION" \
SPECS/nvidia-docker2.spec && \
mv RPMS/noarch/*.rpm /dist
3 changes: 1 addition & 2 deletions Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ ARG DOCKER_VERSION
ENV DEBFULLNAME "NVIDIA CORPORATION"
ENV DEBEMAIL "cudatools@nvidia.com"
ENV REVISION "$PKG_VERS-$PKG_REV"
ENV RUNTIME_VERSION $RUNTIME_VERSION
ENV DOCKER_VERSION $DOCKER_VERSION
ENV SECTION ""

Expand All @@ -33,7 +32,7 @@ COPY daemon.json $DIST_DIR/daemon.json
WORKDIR $DIST_DIR
COPY debian ./debian

RUN sed -i "s;@VERSION@;${REVISION#*+};" debian/changelog && \
RUN sed -i "s;@VERSION@;${REVISION};" debian/changelog && \
if [ "$REVISION" != "$(dpkg-parsechangelog --show-field=Version)" ]; then exit 1; fi

CMD export DISTRIB="unstable" && \
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ ARG DOCKER_VERSION
ENV DEBFULLNAME "NVIDIA CORPORATION"
ENV DEBEMAIL "cudatools@nvidia.com"
ENV REVISION "$PKG_VERS-$PKG_REV"
ENV RUNTIME_VERSION $RUNTIME_VERSION
ENV DOCKER_VERSION $DOCKER_VERSION
ENV SECTION ""

Expand All @@ -35,8 +34,8 @@ WORKDIR $DIST_DIR
COPY debian ./debian


RUN sed -i "s;@VERSION@;${REVISION#*+};" debian/changelog && \
if [ "$REVISION" != "$(dpkg-parsechangelog --show-field=Version)" ]; then exit 1; fi
RUN sed -i "s;@VERSION@;${REVISION};" debian/changelog && \
if [ "$REVISION" != "$(dpkg-parsechangelog --show-field=Version)" ]; then echo "$(dpkg-parsechangelog --show-field=Version)" && exit 1; fi

CMD export DISTRIB="$(lsb_release -cs)" && \
debuild --preserve-env --dpkg-buildpackage-hook='sh debian/prepare' -i -us -uc -b && \
Expand Down
554 changes: 38 additions & 516 deletions Makefile

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
nvidia-docker2 (2.0.3+@VERSION@) UNRELEASED; urgency=medium
nvidia-docker2 (@VERSION@) UNRELEASED; urgency=medium

* 2e9f20b Improve pass-through of docker arguments
* 4edca2f Pave the way for a hypothetical transitional package from v1
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Package: nvidia-docker2
Architecture: all
Breaks: nvidia-docker (<< 2.0.0)
Replaces: nvidia-docker (<< 2.0.0)
Depends: ${misc:Depends}, nvidia-container-runtime (= @RUNTIME_VERSION@), @DOCKER_VERSION@
Depends: ${misc:Depends}, nvidia-container-runtime (>= 3.0.0), @DOCKER_VERSION@
Description: nvidia-docker CLI wrapper
Replaces nvidia-docker with a new implementation based on
nvidia-container-runtime
2 changes: 1 addition & 1 deletion rpm/SPECS/nvidia-docker2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Source1: daemon.json
Source2: LICENSE

Conflicts: nvidia-docker < 2.0.0
Requires: nvidia-container-runtime = %{runtime_version}
Requires: nvidia-container-runtime >= 3.0.0
Requires: %{docker_version}

%description
Expand Down

0 comments on commit 1269921

Please sign in to comment.