From 1c0e69839d3aa2c76d1022f48b58627c456af4b6 Mon Sep 17 00:00:00 2001 From: Felix Abecassis Date: Tue, 6 Mar 2018 15:31:57 -0800 Subject: [PATCH] Refactor Makefiles --- Makefile | 22 +- base/{Dockerfile.centos7 => Dockerfile.amzn} | 3 +- base/{Dockerfile.amzn1 => Dockerfile.centos} | 3 +- .../{Dockerfile.stretch => Dockerfile.debian} | 3 +- base/{Dockerfile.xenial => Dockerfile.ubuntu} | 3 +- base/Makefile | 24 +- hook/{Dockerfile.amzn1 => Dockerfile.amzn} | 5 +- .../{Dockerfile.centos7 => Dockerfile.centos} | 5 +- .../{Dockerfile.stretch => Dockerfile.debian} | 5 +- hook/{Dockerfile.xenial => Dockerfile.ubuntu} | 5 +- hook/Makefile | 32 ++- .../{config.toml.centos7 => config.toml.amzn} | 0 ...config.toml.stretch => config.toml.centos} | 0 hook/config.toml.debian | 11 + ...{config.toml.xenial => config.toml.ubuntu} | 0 runtime/{Dockerfile.amzn1 => Dockerfile.amzn} | 3 +- .../{Dockerfile.centos7 => Dockerfile.centos} | 3 +- .../{Dockerfile.stretch => Dockerfile.debian} | 3 +- .../{Dockerfile.xenial => Dockerfile.ubuntu} | 3 +- runtime/Makefile | 214 ++++-------------- 20 files changed, 146 insertions(+), 201 deletions(-) rename base/{Dockerfile.centos7 => Dockerfile.amzn} (92%) rename base/{Dockerfile.amzn1 => Dockerfile.centos} (93%) rename base/{Dockerfile.stretch => Dockerfile.debian} (94%) rename base/{Dockerfile.xenial => Dockerfile.ubuntu} (94%) rename hook/{Dockerfile.amzn1 => Dockerfile.amzn} (88%) rename hook/{Dockerfile.centos7 => Dockerfile.centos} (88%) rename hook/{Dockerfile.stretch => Dockerfile.debian} (89%) rename hook/{Dockerfile.xenial => Dockerfile.ubuntu} (89%) rename hook/{config.toml.centos7 => config.toml.amzn} (100%) rename hook/{config.toml.stretch => config.toml.centos} (100%) create mode 100644 hook/config.toml.debian rename hook/{config.toml.xenial => config.toml.ubuntu} (100%) rename runtime/{Dockerfile.amzn1 => Dockerfile.amzn} (95%) rename runtime/{Dockerfile.centos7 => Dockerfile.centos} (97%) rename runtime/{Dockerfile.stretch => Dockerfile.debian} (95%) rename runtime/{Dockerfile.xenial => Dockerfile.ubuntu} (95%) diff --git a/Makefile b/Makefile index c8b93a8..1c2cad2 100644 --- a/Makefile +++ b/Makefile @@ -2,32 +2,32 @@ .PHONY: all -all: xenial centos7 stretch amzn1 +all: ubuntu16.04 debian9 centos7 amzn1 # Build all packages for a specific distribution. -xenial: runtime-xenial hook-xenial +ubuntu16.04: runtime-ubuntu16.04 hook-ubuntu16.04 -centos7: runtime-centos7 hook-centos7 +debian9: runtime-debian9 hook-debian9 -stretch: runtime-stretch hook-stretch +centos7: runtime-centos7 hook-centos7 amzn1: runtime-amzn1 hook-amzn1 -base-%: $(CURDIR)/base/Dockerfile.% +base-%: make -C $(CURDIR)/base $* -hook-%: base-% $(CURDIR)/hook/Dockerfile.% +hook-%: base-% make -C $(CURDIR)/hook $* -runtime-%: base-% $(CURDIR)/runtime/Dockerfile.% +runtime-%: base-% make -C $(CURDIR)/runtime $* # Build nvidia-container-runtime for specific versions of docker. -%-runtime-xenial: base-xenial - make -C $(CURDIR)/runtime $*-xenial +%-runtime-ubuntu16.04: base-ubuntu16.04 + make -C $(CURDIR)/runtime $*-ubuntu16.04 -%-runtime-stretch: base-stretch - make -C $(CURDIR)/runtime $*-stretch +%-runtime-debian9: base-debian9 + make -C $(CURDIR)/runtime $*-debian9 %-runtime-centos7: base-centos7 make -C $(CURDIR)/runtime $*-centos7 diff --git a/base/Dockerfile.centos7 b/base/Dockerfile.amzn similarity index 92% rename from base/Dockerfile.centos7 rename to base/Dockerfile.amzn index ddb4bbb..7ce04d3 100644 --- a/base/Dockerfile.centos7 +++ b/base/Dockerfile.amzn @@ -1,4 +1,5 @@ -FROM centos:7 +ARG VERSION_ID +FROM amazonlinux:${VERSION_ID} RUN yum install -y \ ca-certificates \ diff --git a/base/Dockerfile.amzn1 b/base/Dockerfile.centos similarity index 93% rename from base/Dockerfile.amzn1 rename to base/Dockerfile.centos index bd1ee3b..45f0078 100644 --- a/base/Dockerfile.amzn1 +++ b/base/Dockerfile.centos @@ -1,4 +1,5 @@ -FROM amazonlinux:1 +ARG VERSION_ID +FROM centos:${VERSION_ID} RUN yum install -y \ ca-certificates \ diff --git a/base/Dockerfile.stretch b/base/Dockerfile.debian similarity index 94% rename from base/Dockerfile.stretch rename to base/Dockerfile.debian index a59fc47..4b4293b 100644 --- a/base/Dockerfile.stretch +++ b/base/Dockerfile.debian @@ -1,4 +1,5 @@ -FROM debian:stretch +ARG VERSION_ID +FROM debian:${VERSION_ID} RUN apt-get update && apt-get install -y --no-install-recommends \ wget \ diff --git a/base/Dockerfile.xenial b/base/Dockerfile.ubuntu similarity index 94% rename from base/Dockerfile.xenial rename to base/Dockerfile.ubuntu index 83b52b9..bb614e8 100644 --- a/base/Dockerfile.xenial +++ b/base/Dockerfile.ubuntu @@ -1,4 +1,5 @@ -FROM ubuntu:xenial +ARG VERSION_ID +FROM ubuntu:${VERSION_ID} RUN apt-get update && apt-get install -y --no-install-recommends \ wget \ diff --git a/base/Makefile b/base/Makefile index c9a156c..39a7372 100644 --- a/base/Makefile +++ b/base/Makefile @@ -7,8 +7,24 @@ GOLANG_VERSION := 1.9.4 .NOTPARALLEL: .PHONY: all -all: xenial centos7 stretch +all: ubuntu16.04 debian9 centos7 amzn1 -%: $(CURDIR)/Dockerfile.% - $(DOCKER) build --build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \ - -t nvidia/build-base:$@ -f Dockerfile.$@ . +ubuntu%: $(CURDIR)/Dockerfile.ubuntu + $(DOCKER) build --build-arg VERSION_ID="$*" \ + --build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \ + -t "nvidia/base/ubuntu:$*" -f Dockerfile.ubuntu . + +debian%: $(CURDIR)/Dockerfile.debian + $(DOCKER) build --build-arg VERSION_ID="$*" \ + --build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \ + -t "nvidia/base/debian:$*" -f Dockerfile.debian . + +centos%: $(CURDIR)/Dockerfile.centos + $(DOCKER) build --build-arg VERSION_ID="$*" \ + --build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \ + -t "nvidia/base/centos:$*" -f Dockerfile.centos . + +amzn%: $(CURDIR)/Dockerfile.amzn + $(DOCKER) build --build-arg VERSION_ID="$*" \ + --build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \ + -t "nvidia/base/amzn:$*" -f Dockerfile.amzn . diff --git a/hook/Dockerfile.amzn1 b/hook/Dockerfile.amzn similarity index 88% rename from hook/Dockerfile.amzn1 rename to hook/Dockerfile.amzn index c350f50..3eb7608 100644 --- a/hook/Dockerfile.amzn1 +++ b/hook/Dockerfile.amzn @@ -1,4 +1,5 @@ -FROM nvidia/build-base:amzn1 +ARG VERSION_ID +FROM nvidia/base/amzn:${VERSION_ID} # packaging ARG PKG_VERS @@ -17,7 +18,7 @@ COPY nvidia-container-runtime-hook/ $GOPATH/src/nvidia-container-runtime-hook RUN go get -ldflags "-s -w" -v nvidia-container-runtime-hook && \ mv $GOPATH/bin/nvidia-container-runtime-hook $DIST_DIR/nvidia-container-runtime-hook -COPY config.toml.amzn1 $DIST_DIR/config.toml +COPY config.toml.amzn $DIST_DIR/config.toml WORKDIR $DIST_DIR/.. COPY rpm . diff --git a/hook/Dockerfile.centos7 b/hook/Dockerfile.centos similarity index 88% rename from hook/Dockerfile.centos7 rename to hook/Dockerfile.centos index 2767630..fe05140 100644 --- a/hook/Dockerfile.centos7 +++ b/hook/Dockerfile.centos @@ -1,4 +1,5 @@ -FROM nvidia/build-base:centos7 +ARG VERSION_ID +FROM nvidia/base/centos:${VERSION_ID} # packaging ARG PKG_VERS @@ -17,7 +18,7 @@ COPY nvidia-container-runtime-hook/ $GOPATH/src/nvidia-container-runtime-hook RUN go get -ldflags "-s -w" -v nvidia-container-runtime-hook && \ mv $GOPATH/bin/nvidia-container-runtime-hook $DIST_DIR/nvidia-container-runtime-hook -COPY config.toml.centos7 $DIST_DIR/config.toml +COPY config.toml.centos $DIST_DIR/config.toml WORKDIR $DIST_DIR/.. COPY rpm . diff --git a/hook/Dockerfile.stretch b/hook/Dockerfile.debian similarity index 89% rename from hook/Dockerfile.stretch rename to hook/Dockerfile.debian index 67d4259..17712dd 100644 --- a/hook/Dockerfile.stretch +++ b/hook/Dockerfile.debian @@ -1,4 +1,5 @@ -FROM nvidia/build-base:stretch +ARG VERSION_ID +FROM nvidia/base/debian:${VERSION_ID} # packaging ARG PKG_VERS @@ -21,7 +22,7 @@ COPY nvidia-container-runtime-hook/ $GOPATH/src/nvidia-container-runtime-hook RUN go get -ldflags "-s -w" -v nvidia-container-runtime-hook && \ mv $GOPATH/bin/nvidia-container-runtime-hook $DIST_DIR/nvidia-container-runtime-hook -COPY config.toml.stretch $DIST_DIR/config.toml +COPY config.toml.debian $DIST_DIR/config.toml WORKDIR $DIST_DIR COPY debian ./debian diff --git a/hook/Dockerfile.xenial b/hook/Dockerfile.ubuntu similarity index 89% rename from hook/Dockerfile.xenial rename to hook/Dockerfile.ubuntu index 32d2766..e63efa4 100644 --- a/hook/Dockerfile.xenial +++ b/hook/Dockerfile.ubuntu @@ -1,4 +1,5 @@ -FROM nvidia/build-base:xenial +ARG VERSION_ID +FROM nvidia/base/ubuntu:${VERSION_ID} # packaging ARG PKG_VERS @@ -21,7 +22,7 @@ COPY nvidia-container-runtime-hook/ $GOPATH/src/nvidia-container-runtime-hook RUN go get -ldflags "-s -w" -v nvidia-container-runtime-hook && \ mv $GOPATH/bin/nvidia-container-runtime-hook $DIST_DIR/nvidia-container-runtime-hook -COPY config.toml.xenial $DIST_DIR/config.toml +COPY config.toml.ubuntu $DIST_DIR/config.toml WORKDIR $DIST_DIR COPY debian ./debian diff --git a/hook/Makefile b/hook/Makefile index 28a4684..53834ef 100644 --- a/hook/Makefile +++ b/hook/Makefile @@ -10,10 +10,32 @@ DIST_DIR := $(CURDIR)/../dist .NOTPARALLEL: .PHONY: all -all: xenial centos7 stretch amzn1 +all: ubuntu16.04 debian9 centos7 amzn1 -%: $(CURDIR)/Dockerfile.% - $(DOCKER) build --build-arg PKG_VERS="$(VERSION)" \ +ubuntu%: $(CURDIR)/Dockerfile.ubuntu + $(DOCKER) build --build-arg VERSION_ID="$*" \ + --build-arg PKG_VERS="$(VERSION)" \ --build-arg PKG_REV="$(PKG_REV)" \ - -t nvidia-container-runtime-hook:$@ -f Dockerfile.$@ . - $(DOCKER) run --rm -v $(DIST_DIR)/$@:/dist:Z nvidia-container-runtime-hook:$@ + -t "nvidia/hook/ubuntu:$*" -f Dockerfile.ubuntu . + $(DOCKER) run --rm -v $(DIST_DIR)/$@:/dist:Z "nvidia/hook/ubuntu:$*" + +debian%: $(CURDIR)/Dockerfile.debian + $(DOCKER) build --build-arg VERSION_ID="$*" \ + --build-arg PKG_VERS="$(VERSION)" \ + --build-arg PKG_REV="$(PKG_REV)" \ + -t "nvidia/hook/debian:$*" -f Dockerfile.debian . + $(DOCKER) run --rm -v $(DIST_DIR)/$@:/dist:Z "nvidia/hook/debian:$*" + +centos%: $(CURDIR)/Dockerfile.centos + $(DOCKER) build --build-arg VERSION_ID="$*" \ + --build-arg PKG_VERS="$(VERSION)" \ + --build-arg PKG_REV="$(PKG_REV)" \ + -t "nvidia/hook/centos:$*" -f Dockerfile.centos . + $(DOCKER) run --rm -v $(DIST_DIR)/$@:/dist:Z "nvidia/hook/centos:$*" + +amzn%: $(CURDIR)/Dockerfile.amzn + $(DOCKER) build --build-arg VERSION_ID="$*" \ + --build-arg PKG_VERS="$(VERSION)" \ + --build-arg PKG_REV="$(PKG_REV)" \ + -t "nvidia/hook/amzn:$*" -f Dockerfile.amzn . + $(DOCKER) run --rm -v $(DIST_DIR)/$@:/dist:Z "nvidia/hook/amzn:$*" diff --git a/hook/config.toml.centos7 b/hook/config.toml.amzn similarity index 100% rename from hook/config.toml.centos7 rename to hook/config.toml.amzn diff --git a/hook/config.toml.stretch b/hook/config.toml.centos similarity index 100% rename from hook/config.toml.stretch rename to hook/config.toml.centos diff --git a/hook/config.toml.debian b/hook/config.toml.debian new file mode 100644 index 0000000..a0c73a1 --- /dev/null +++ b/hook/config.toml.debian @@ -0,0 +1,11 @@ +disable-require = false +#swarm-resource = "DOCKER_RESOURCE_GPU" + +[nvidia-container-cli] +#root = "/run/nvidia/driver" +#path = "/usr/bin/nvidia-container-cli" +environment = [] +#debug = "/var/log/nvidia-container-runtime-hook.log" +#ldcache = "/etc/ld.so.cache" +load-kmods = true +ldconfig = "@/sbin/ldconfig" diff --git a/hook/config.toml.xenial b/hook/config.toml.ubuntu similarity index 100% rename from hook/config.toml.xenial rename to hook/config.toml.ubuntu diff --git a/runtime/Dockerfile.amzn1 b/runtime/Dockerfile.amzn similarity index 95% rename from runtime/Dockerfile.amzn1 rename to runtime/Dockerfile.amzn index 8081de4..b56a4dc 100644 --- a/runtime/Dockerfile.amzn1 +++ b/runtime/Dockerfile.amzn @@ -1,4 +1,5 @@ -FROM nvidia/build-base:amzn1 +ARG VERSION_ID +FROM nvidia/base/amzn:${VERSION_ID} # runc dependencies RUN yum install -y \ diff --git a/runtime/Dockerfile.centos7 b/runtime/Dockerfile.centos similarity index 97% rename from runtime/Dockerfile.centos7 rename to runtime/Dockerfile.centos index 118e082..e092f21 100644 --- a/runtime/Dockerfile.centos7 +++ b/runtime/Dockerfile.centos @@ -1,4 +1,5 @@ -FROM nvidia/build-base:centos7 +ARG VERSION_ID +FROM nvidia/base/centos:${VERSION_ID} # Install a more version of git (for vndr) RUN yum install -y \ diff --git a/runtime/Dockerfile.stretch b/runtime/Dockerfile.debian similarity index 95% rename from runtime/Dockerfile.stretch rename to runtime/Dockerfile.debian index 1a1f6b4..362783a 100644 --- a/runtime/Dockerfile.stretch +++ b/runtime/Dockerfile.debian @@ -1,4 +1,5 @@ -FROM nvidia/build-base:stretch +ARG VERSION_ID +FROM nvidia/base/debian:${VERSION_ID} # runc dependencies RUN apt-get update && apt-get install -y \ diff --git a/runtime/Dockerfile.xenial b/runtime/Dockerfile.ubuntu similarity index 95% rename from runtime/Dockerfile.xenial rename to runtime/Dockerfile.ubuntu index 356dfc6..eea35d6 100644 --- a/runtime/Dockerfile.xenial +++ b/runtime/Dockerfile.ubuntu @@ -1,4 +1,5 @@ -FROM nvidia/build-base:xenial +ARG VERSION_ID +FROM nvidia/base/ubuntu:${VERSION_ID} # runc dependencies RUN apt-get update && apt-get install -y \ diff --git a/runtime/Makefile b/runtime/Makefile index bd34b7e..c2a63de 100644 --- a/runtime/Makefile +++ b/runtime/Makefile @@ -10,187 +10,71 @@ DIST_DIR := $(CURDIR)/../dist .NOTPARALLEL: .PHONY: all -all: xenial centos7 stretch +all: ubuntu16.04 debian9 centos7 amzn1 -xenial: 17.12.1-xenial 17.12.0-xenial 17.09.1-xenial 17.09.0-xenial 17.06.2-xenial 17.03.2-xenial 1.13.1-xenial 1.12.6-xenial +ubuntu16.04: $(addsuffix -ubuntu16.04, 17.12.1 17.12.0 17.09.1 17.09.0 17.06.2 17.03.2 1.13.1 1.12.6) -centos7: 17.12.1-centos7 17.12.0-centos7 17.09.1-centos7 17.09.0-centos7 17.06.2-centos7 17.03.2-centos7 1.13.1-centos7 1.12.6-centos7 +debian9: $(addsuffix -debian9, 17.12.1 17.12.0 17.09.1 17.09.0 17.06.2 17.03.2) -stretch: 17.12.1-stretch 17.12.0-stretch 17.09.1-stretch 17.09.0-stretch 17.06.2-stretch 17.03.2-stretch +centos7: $(addsuffix -centos7, 17.12.1 17.12.0 17.09.1 17.09.0 17.06.2 17.03.2 1.13.1 1.12.6) -amzn1: 17.09.1-amzn1 17.06.2-amzn1 17.03.2-amzn1 +amzn1: $(addsuffix -amzn1, 17.09.1 17.06.2 17.03.2) -17.12.1-xenial: - $(DOCKER) build --build-arg RUNC_COMMIT="9f9c96235cc97674e935002fc3d78361b696a69e" \ - --build-arg PKG_VERS="$(VERSION)+docker17.12.1" \ - --build-arg PKG_REV="$(PKG_REV)" \ - -t nvidia-container-runtime:$@ -f Dockerfile.xenial . - $(DOCKER) run --rm -v $(DIST_DIR)/xenial:/dist:Z nvidia-container-runtime:$@ - -17.12.0-xenial: - $(DOCKER) build --build-arg RUNC_COMMIT="b2567b37d7b75eb4cf325b77297b140ea686ce8f" \ - --build-arg PKG_VERS="$(VERSION)+docker17.12.0" \ - --build-arg PKG_REV="$(PKG_REV)" \ - -t nvidia-container-runtime:$@ -f Dockerfile.xenial . - $(DOCKER) run --rm -v $(DIST_DIR)/xenial:/dist:Z nvidia-container-runtime:$@ - -17.09.1-xenial: - $(DOCKER) build --build-arg RUNC_COMMIT="3f2f8b84a77f73d38244dd690525642a72156c64" \ - --build-arg PKG_VERS="$(VERSION)+docker17.09.1" \ - --build-arg PKG_REV="$(PKG_REV)" \ - -t nvidia-container-runtime:$@ -f Dockerfile.xenial . - $(DOCKER) run --rm -v $(DIST_DIR)/xenial:/dist:Z nvidia-container-runtime:$@ - -17.09.0-xenial: - $(DOCKER) build --build-arg RUNC_COMMIT="3f2f8b84a77f73d38244dd690525642a72156c64" \ - --build-arg PKG_VERS="$(VERSION)+docker17.09.0" \ - --build-arg PKG_REV="$(PKG_REV)" \ - -t nvidia-container-runtime:$@ -f Dockerfile.xenial . - $(DOCKER) run --rm -v $(DIST_DIR)/xenial:/dist:Z nvidia-container-runtime:$@ - -17.06.2-xenial: - $(DOCKER) build --build-arg RUNC_COMMIT="810190ceaa507aa2727d7ae6f4790c76ec150bd2" \ - --build-arg PKG_VERS="$(VERSION)+docker17.06.2" \ - --build-arg PKG_REV="$(PKG_REV)" \ - -t nvidia-container-runtime:$@ -f Dockerfile.xenial . - $(DOCKER) run --rm -v $(DIST_DIR)/xenial:/dist:Z nvidia-container-runtime:$@ -17.03.2-xenial: - $(DOCKER) build --build-arg RUNC_COMMIT="54296cf40ad8143b62dbcaa1d90e520a2136ddfe" \ - --build-arg PKG_VERS="$(VERSION)+docker17.03.2" \ - --build-arg PKG_REV="$(PKG_REV)" \ - -t nvidia-container-runtime:$@ -f Dockerfile.xenial . - $(DOCKER) run --rm -v $(DIST_DIR)/xenial:/dist:Z nvidia-container-runtime:$@ +17.12.1-%-runc: + echo "9f9c96235cc97674e935002fc3d78361b696a69e" -1.13.1-xenial: - $(DOCKER) build --build-arg RUNC_COMMIT="9df8b306d01f59d3a8029be411de015b7304dd8f" \ - --build-arg PKG_VERS="$(VERSION)+docker1.13.1" \ - --build-arg PKG_REV="$(PKG_REV)" \ - -t nvidia-container-runtime:$@ -f Dockerfile.xenial . - $(DOCKER) run --rm -v $(DIST_DIR)/xenial:/dist:Z nvidia-container-runtime:$@ +17.12.0-%-runc: + echo "b2567b37d7b75eb4cf325b77297b140ea686ce8f" -1.12.6-xenial: - $(DOCKER) build --build-arg RUNC_COMMIT="50a19c6ff828c58e5dab13830bd3dacde268afe5" \ - --build-arg PKG_VERS="$(VERSION)+docker1.12.6" \ - --build-arg PKG_REV="$(PKG_REV)" \ - -t nvidia-container-runtime:$@ -f Dockerfile.xenial . - $(DOCKER) run --rm -v $(DIST_DIR)/xenial:/dist:Z nvidia-container-runtime:$@ +17.09.1-%-runc 17.09.0-%-runc: + echo "3f2f8b84a77f73d38244dd690525642a72156c64" -17.12.1-centos7: - $(DOCKER) build --build-arg RUNC_COMMIT="9f9c96235cc97674e935002fc3d78361b696a69e" \ - --build-arg PKG_VERS="$(VERSION)" \ - --build-arg PKG_REV="$(PKG_REV).docker17.12.1" \ - -t nvidia-container-runtime:$@ -f Dockerfile.centos7 . - $(DOCKER) run --rm -v $(DIST_DIR)/centos7:/dist:Z nvidia-container-runtime:$@ +17.06.2-%-runc: + echo "810190ceaa507aa2727d7ae6f4790c76ec150bd2" -17.12.0-centos7: - $(DOCKER) build --build-arg RUNC_COMMIT="b2567b37d7b75eb4cf325b77297b140ea686ce8f" \ - --build-arg PKG_VERS="$(VERSION)" \ - --build-arg PKG_REV="$(PKG_REV).docker17.12.0" \ - -t nvidia-container-runtime:$@ -f Dockerfile.centos7 . - $(DOCKER) run --rm -v $(DIST_DIR)/centos7:/dist:Z nvidia-container-runtime:$@ +17.03.2-%-runc: + echo "54296cf40ad8143b62dbcaa1d90e520a2136ddfe" -17.09.1-centos7: - $(DOCKER) build --build-arg RUNC_COMMIT="3f2f8b84a77f73d38244dd690525642a72156c64" \ - --build-arg PKG_VERS="$(VERSION)" \ - --build-arg PKG_REV="$(PKG_REV).docker17.09.1" \ - -t nvidia-container-runtime:$@ -f Dockerfile.centos7 . - $(DOCKER) run --rm -v $(DIST_DIR)/centos7:/dist:Z nvidia-container-runtime:$@ +1.13.1-%-runc: + echo "9df8b306d01f59d3a8029be411de015b7304dd8f" -17.09.0-centos7: - $(DOCKER) build --build-arg RUNC_COMMIT="3f2f8b84a77f73d38244dd690525642a72156c64" \ - --build-arg PKG_VERS="$(VERSION)" \ - --build-arg PKG_REV="$(PKG_REV).docker17.09.0" \ - -t nvidia-container-runtime:$@ -f Dockerfile.centos7 . - $(DOCKER) run --rm -v $(DIST_DIR)/centos7:/dist:Z nvidia-container-runtime:$@ +1.12.6-%-runc: + echo "50a19c6ff828c58e5dab13830bd3dacde268afe5" -17.06.2-centos7: - $(DOCKER) build --build-arg RUNC_COMMIT="810190ceaa507aa2727d7ae6f4790c76ec150bd2" \ - --build-arg PKG_VERS="$(VERSION)" \ - --build-arg PKG_REV="$(PKG_REV).docker17.06.2" \ - -t nvidia-container-runtime:$@ -f Dockerfile.centos7 . - $(DOCKER) run --rm -v $(DIST_DIR)/centos7:/dist:Z nvidia-container-runtime:$@ -17.03.2-centos7: - $(DOCKER) build --build-arg RUNC_COMMIT="54296cf40ad8143b62dbcaa1d90e520a2136ddfe" \ - --build-arg PKG_VERS="$(VERSION)" \ - --build-arg PKG_REV="$(PKG_REV).docker17.03.2" \ - -t nvidia-container-runtime:$@ -f Dockerfile.centos7 . - $(DOCKER) run --rm -v $(DIST_DIR)/centos7:/dist:Z nvidia-container-runtime:$@ - -1.13.1-centos7: - $(DOCKER) build --build-arg RUNC_COMMIT="9df8b306d01f59d3a8029be411de015b7304dd8f" \ - --build-arg PKG_VERS="$(VERSION)" \ - --build-arg PKG_REV="$(PKG_REV).docker1.13.1" \ - -t nvidia-container-runtime:$@ -f Dockerfile.centos7 . - $(DOCKER) run --rm -v $(DIST_DIR)/centos7:/dist:Z nvidia-container-runtime:$@ - -1.12.6-centos7: - $(DOCKER) build --build-arg RUNC_COMMIT="50a19c6ff828c58e5dab13830bd3dacde268afe5" \ - --build-arg PKG_VERS="$(VERSION)" \ - --build-arg PKG_REV="$(PKG_REV).docker1.12.6" \ - -t nvidia-container-runtime:$@ -f Dockerfile.centos7 . - $(DOCKER) run --rm -v $(DIST_DIR)/centos7:/dist:Z nvidia-container-runtime:$@ - -17.12.1-stretch: - $(DOCKER) build --build-arg RUNC_COMMIT="9f9c96235cc97674e935002fc3d78361b696a69e" \ - --build-arg PKG_VERS="$(VERSION)+docker17.12.1" \ +%-ubuntu16.04: + runc="$(shell $(MAKE) -s $@-runc)" && \ + $(DOCKER) build --build-arg VERSION_ID="16.04" \ + --build-arg RUNC_COMMIT="$${runc}" \ + --build-arg PKG_VERS="$(VERSION)+docker$*" \ --build-arg PKG_REV="$(PKG_REV)" \ - -t nvidia-container-runtime:$@ -f Dockerfile.stretch . - $(DOCKER) run --rm -v $(DIST_DIR)/stretch:/dist:Z nvidia-container-runtime:$@ - -17.12.0-stretch: - $(DOCKER) build --build-arg RUNC_COMMIT="b2567b37d7b75eb4cf325b77297b140ea686ce8f" \ - --build-arg PKG_VERS="$(VERSION)+docker17.12.0" \ - --build-arg PKG_REV="$(PKG_REV)" \ - -t nvidia-container-runtime:$@ -f Dockerfile.stretch . - $(DOCKER) run --rm -v $(DIST_DIR)/stretch:/dist:Z nvidia-container-runtime:$@ - -17.09.1-stretch: - $(DOCKER) build --build-arg RUNC_COMMIT="3f2f8b84a77f73d38244dd690525642a72156c64" \ - --build-arg PKG_VERS="$(VERSION)+docker17.09.1" \ + -t "nvidia/runtime/ubuntu:16.04-docker$*" -f Dockerfile.ubuntu . + $(DOCKER) run --rm -v $(DIST_DIR)/ubuntu16.04:/dist:Z "nvidia/runtime/ubuntu:16.04-docker$*" + +%-debian9: + runc="$(shell $(MAKE) -s $@-runc)" && \ + $(DOCKER) build --build-arg VERSION_ID="9" \ + --build-arg RUNC_COMMIT="$${runc}" \ + --build-arg PKG_VERS="$(VERSION)+docker$*" \ --build-arg PKG_REV="$(PKG_REV)" \ - -t nvidia-container-runtime:$@ -f Dockerfile.stretch . - $(DOCKER) run --rm -v $(DIST_DIR)/stretch:/dist:Z nvidia-container-runtime:$@ + -t "nvidia/runtime/debian:9-docker$*" -f Dockerfile.debian . + $(DOCKER) run --rm -v $(DIST_DIR)/debian9:/dist:Z "nvidia/runtime/debian:9-docker$*" -17.09.0-stretch: - $(DOCKER) build --build-arg RUNC_COMMIT="3f2f8b84a77f73d38244dd690525642a72156c64" \ - --build-arg PKG_VERS="$(VERSION)+docker17.09.0" \ - --build-arg PKG_REV="$(PKG_REV)" \ - -t nvidia-container-runtime:$@ -f Dockerfile.stretch . - $(DOCKER) run --rm -v $(DIST_DIR)/stretch:/dist:Z nvidia-container-runtime:$@ - -17.06.2-stretch: - $(DOCKER) build --build-arg RUNC_COMMIT="810190ceaa507aa2727d7ae6f4790c76ec150bd2" \ - --build-arg PKG_VERS="$(VERSION)+docker17.06.2" \ - --build-arg PKG_REV="$(PKG_REV)" \ - -t nvidia-container-runtime:$@ -f Dockerfile.stretch . - $(DOCKER) run --rm -v $(DIST_DIR)/stretch:/dist:Z nvidia-container-runtime:$@ - -17.03.2-stretch: - $(DOCKER) build --build-arg RUNC_COMMIT="54296cf40ad8143b62dbcaa1d90e520a2136ddfe" \ - --build-arg PKG_VERS="$(VERSION)+docker17.03.2" \ - --build-arg PKG_REV="$(PKG_REV)" \ - -t nvidia-container-runtime:$@ -f Dockerfile.stretch . - $(DOCKER) run --rm -v $(DIST_DIR)/stretch:/dist:Z nvidia-container-runtime:$@ - -17.09.1-amzn1: - $(DOCKER) build --build-arg RUNC_COMMIT="3f2f8b84a77f73d38244dd690525642a72156c64" \ - --build-arg PKG_VERS="$(VERSION)" \ - --build-arg PKG_REV="$(PKG_REV).docker17.09.1.amzn1" \ - -t nvidia-container-runtime:$@ -f Dockerfile.amzn1 . - $(DOCKER) run --rm -v $(DIST_DIR)/amzn1:/dist:Z nvidia-container-runtime:$@ - -17.06.2-amzn1: - $(DOCKER) build --build-arg RUNC_COMMIT="810190ceaa507aa2727d7ae6f4790c76ec150bd2" \ +%-centos7: + runc="$(shell $(MAKE) -s $@-runc)" && \ + $(DOCKER) build --build-arg VERSION_ID="7" \ + --build-arg RUNC_COMMIT="$${runc}" \ --build-arg PKG_VERS="$(VERSION)" \ - --build-arg PKG_REV="$(PKG_REV).docker17.06.2.amzn1" \ - -t nvidia-container-runtime:$@ -f Dockerfile.amzn1 . - $(DOCKER) run --rm -v $(DIST_DIR)/amzn1:/dist:Z nvidia-container-runtime:$@ - -17.03.2-amzn1: - $(DOCKER) build --build-arg RUNC_COMMIT="54296cf40ad8143b62dbcaa1d90e520a2136ddfe" \ + --build-arg PKG_REV="$(PKG_REV).docker$*" \ + -t "nvidia/runtime/centos:7-docker$*" -f Dockerfile.centos . + $(DOCKER) run --rm -v $(DIST_DIR)/centos7:/dist:Z "nvidia/runtime/centos:7-docker$*" + +%-amzn1: + runc="$(shell $(MAKE) -s $@-runc)" && \ + $(DOCKER) build --build-arg VERSION_ID="1" \ + --build-arg RUNC_COMMIT="$${runc}" \ --build-arg PKG_VERS="$(VERSION)" \ - --build-arg PKG_REV="$(PKG_REV).docker17.03.2.amzn1" \ - -t nvidia-container-runtime:$@ -f Dockerfile.amzn1 . - $(DOCKER) run --rm -v $(DIST_DIR)/amzn1:/dist:Z nvidia-container-runtime:$@ + --build-arg PKG_REV="$(PKG_REV).docker$*.amzn1" \ + -t "nvidia/runtime/amzn:1-docker$*" -f Dockerfile.amzn . + $(DOCKER) run --rm -v $(DIST_DIR)/amzn1:/dist:Z "nvidia/runtime/amzn:1-docker$*" -- GitLab