Add support for Debian Stretch
This commit is contained in:
parent
6676f64c77
commit
8aa5593f29
40
Dockerfile.stretch
Normal file
40
Dockerfile.stretch
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
FROM debian:stretch
|
||||||
|
|
||||||
|
# packaging dependencies
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
dh-make \
|
||||||
|
fakeroot \
|
||||||
|
build-essential \
|
||||||
|
devscripts && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# packaging
|
||||||
|
ARG PKG_VERS
|
||||||
|
ARG PKG_REV
|
||||||
|
ARG RUNTIME_VERSION
|
||||||
|
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 DISTRIB "UNRELEASED"
|
||||||
|
ENV SECTION ""
|
||||||
|
|
||||||
|
# output directory
|
||||||
|
ENV DIST_DIR=/tmp/nvidia-docker2-$PKG_VERS
|
||||||
|
RUN mkdir -p $DIST_DIR
|
||||||
|
|
||||||
|
# nvidia-docker 2.0
|
||||||
|
COPY nvidia-docker $DIST_DIR/nvidia-docker
|
||||||
|
COPY daemon.json $DIST_DIR/daemon.json
|
||||||
|
|
||||||
|
WORKDIR $DIST_DIR
|
||||||
|
COPY debian ./debian
|
||||||
|
|
||||||
|
RUN dch --create --package nvidia-docker2 -v "$REVISION" "v$REVISION" -D "$DISTRIB" && \
|
||||||
|
dch -r ""
|
||||||
|
|
||||||
|
CMD debuild --preserve-env --dpkg-buildpackage-hook='sh debian/prepare' -i -us -uc -b && \
|
||||||
|
mv /tmp/*.deb /dist
|
28
Makefile
28
Makefile
|
@ -11,12 +11,14 @@ DIST_DIR := $(CURDIR)/dist
|
||||||
.NOTPARALLEL:
|
.NOTPARALLEL:
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
|
|
||||||
all: xenial centos7
|
all: xenial centos7 stretch
|
||||||
|
|
||||||
xenial: 17.09.0-xenial 17.06.2-xenial 17.03.2-xenial 1.13.1-xenial 1.12.6-xenial
|
xenial: 17.09.0-xenial 17.06.2-xenial 17.03.2-xenial 1.13.1-xenial 1.12.6-xenial
|
||||||
|
|
||||||
centos7: 17.09.0.ce-centos7 17.06.2.ce-centos7 17.03.2.ce-centos7 1.12.6-centos7
|
centos7: 17.09.0.ce-centos7 17.06.2.ce-centos7 17.03.2.ce-centos7 1.12.6-centos7
|
||||||
|
|
||||||
|
stretch: 17.09.0-stretch 17.06.2-stretch 17.03.2-stretch
|
||||||
|
|
||||||
17.09.0-xenial:
|
17.09.0-xenial:
|
||||||
$(DOCKER) build --build-arg RUNTIME_VERSION="$(RUNTIME_VERSION)+docker17.09.0-1" \
|
$(DOCKER) build --build-arg RUNTIME_VERSION="$(RUNTIME_VERSION)+docker17.09.0-1" \
|
||||||
--build-arg DOCKER_VERSION="docker-ce (= 17.09.0~ce-0~ubuntu) | docker-ee (= 17.09.0~ee-0~ubuntu)" \
|
--build-arg DOCKER_VERSION="docker-ce (= 17.09.0~ce-0~ubuntu) | docker-ee (= 17.09.0~ee-0~ubuntu)" \
|
||||||
|
@ -88,3 +90,27 @@ centos7: 17.09.0.ce-centos7 17.06.2.ce-centos7 17.03.2.ce-centos7 1.12.6-centos7
|
||||||
--build-arg PKG_REV="$(PKG_REV).docker1.12.6" \
|
--build-arg PKG_REV="$(PKG_REV).docker1.12.6" \
|
||||||
-t nvidia-docker2:$@ -f Dockerfile.centos7 .
|
-t nvidia-docker2:$@ -f Dockerfile.centos7 .
|
||||||
$(DOCKER) run --rm -v $(DIST_DIR)/centos7:/dist:Z nvidia-docker2:$@
|
$(DOCKER) run --rm -v $(DIST_DIR)/centos7:/dist:Z nvidia-docker2:$@
|
||||||
|
|
||||||
|
17.09.0-stretch:
|
||||||
|
$(DOCKER) build --build-arg RUNTIME_VERSION="$(RUNTIME_VERSION)+docker17.09.0-1" \
|
||||||
|
--build-arg DOCKER_VERSION="docker-ce (= 17.09.0~ce-0~debian)" \
|
||||||
|
--build-arg PKG_VERS="$(VERSION)+docker17.09.0" \
|
||||||
|
--build-arg PKG_REV="$(PKG_REV)" \
|
||||||
|
-t nvidia-docker2:$@ -f Dockerfile.stretch .
|
||||||
|
$(DOCKER) run --rm -v $(DIST_DIR)/stretch:/dist:Z nvidia-docker2:$@
|
||||||
|
|
||||||
|
17.06.2-stretch:
|
||||||
|
$(DOCKER) build --build-arg RUNTIME_VERSION="$(RUNTIME_VERSION)+docker17.06.2-1" \
|
||||||
|
--build-arg DOCKER_VERSION="docker-ce (= 17.06.2~ce-0~debian)" \
|
||||||
|
--build-arg PKG_VERS="$(VERSION)+docker17.06.2" \
|
||||||
|
--build-arg PKG_REV="$(PKG_REV)" \
|
||||||
|
-t nvidia-docker2:$@ -f Dockerfile.stretch .
|
||||||
|
$(DOCKER) run --rm -v $(DIST_DIR)/stretch:/dist:Z nvidia-docker2:$@
|
||||||
|
|
||||||
|
17.03.2-stretch:
|
||||||
|
$(DOCKER) build --build-arg RUNTIME_VERSION="$(RUNTIME_VERSION)+docker17.03.2-1" \
|
||||||
|
--build-arg DOCKER_VERSION="docker-ce (= 17.03.2~ce-0~debian-stretch)" \
|
||||||
|
--build-arg PKG_VERS="$(VERSION)+docker17.03.2" \
|
||||||
|
--build-arg PKG_REV="$(PKG_REV)" \
|
||||||
|
-t nvidia-docker2:$@ -f Dockerfile.stretch .
|
||||||
|
$(DOCKER) run --rm -v $(DIST_DIR)/stretch:/dist:Z nvidia-docker2:$@
|
||||||
|
|
Loading…
Reference in a new issue