forked from NVIDIA/nvidia-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
93 lines (82 loc) · 4.35 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
DOCKER ?= docker
MKDIR ?= mkdir
VERSION := 2.2.0
RUNTIME_VERSION := 3.1.0
PKG_REV := 1
DIST_DIR := $(CURDIR)/dist
.NOTPARALLEL:
.PHONY: all
all: ubuntu18.04 ubuntu16.04 debian9 centos7 amzn2 amzn1
ubuntu18.04: ARCH := amd64
ubuntu18.04:
$(DOCKER) build --build-arg VERSION_ID="18.04" \
--build-arg DOCKER_VERSION="docker-ce (>= 18.06.0~ce~3-0~ubuntu) | docker-ee (>= 18.06.0~ce~3-0~ubuntu) | docker.io (>= 18.06.0)" \
--build-arg RUNTIME_VERSION="$(RUNTIME_VERSION)" \
--build-arg PKG_VERS="$(VERSION)" \
--build-arg PKG_REV="$(PKG_REV)" \
-t "nvidia/nvidia-docker2/ubuntu:18.04" -f Dockerfile.ubuntu .
$(MKDIR) -p $(DIST_DIR)/ubuntu18.04/$(ARCH)
$(DOCKER) run --cidfile [email protected] "nvidia/nvidia-docker2/ubuntu:18.04"
$(DOCKER) cp $$(cat [email protected]):/dist/. $(DIST_DIR)/ubuntu18.04/$(ARCH)
$(DOCKER) rm $$(cat [email protected]) && rm [email protected]
ubuntu16.04: ARCH := amd64
ubuntu16.04:
$(DOCKER) build --build-arg VERSION_ID="16.04" \
--build-arg DOCKER_VERSION="docker-ce (>= 18.06.0~ce~3-0~ubuntu) | docker-ee (>= 18.06.0~ce~3-0~ubuntu) | docker.io (>= 18.06.0)" \
--build-arg RUNTIME_VERSION="$(RUNTIME_VERSION)" \
--build-arg PKG_VERS="$(VERSION)" \
--build-arg PKG_REV="$(PKG_REV)" \
-t "nvidia/nvidia-docker2/ubuntu:16.04" -f Dockerfile.ubuntu .
$(MKDIR) -p $(DIST_DIR)/ubuntu16.04/$(ARCH)
$(DOCKER) run --cidfile [email protected] "nvidia/nvidia-docker2/ubuntu:16.04"
$(DOCKER) cp $$(cat [email protected]):/dist/. $(DIST_DIR)/ubuntu16.04/$(ARCH)
$(DOCKER) rm $$(cat [email protected]) && rm [email protected]
debian9: ARCH := amd64
debian9:
$(DOCKER) build --build-arg VERSION_ID="9" \
--build-arg DOCKER_VERSION="docker-ce (>= 18.06.0~ce~3-0~debian) | docker-ee (>= 18.06.0~ce~3-0~debian) | docker.io (>= 18.06.0)" \
--build-arg RUNTIME_VERSION="$(RUNTIME_VERSION)" \
--build-arg PKG_VERS="$(VERSION)" \
--build-arg PKG_REV="$(PKG_REV)" \
-t "nvidia/nvidia-docker2/debian:9" -f Dockerfile.debian .
$(MKDIR) -p $(DIST_DIR)/debian9/$(ARCH)
$(DOCKER) run --cidfile [email protected] "nvidia/nvidia-docker2/debian:9"
$(DOCKER) cp $$(cat [email protected]):/dist/. $(DIST_DIR)/debian9/$(ARCH)
$(DOCKER) rm $$(cat [email protected]) && rm [email protected]
centos7: ARCH := x86_64
centos7:
$(DOCKER) build --build-arg VERSION_ID="7" \
--build-arg DOCKER_VERSION="docker-ce >= 18.06.3.ce-3.el7" \
--build-arg RUNTIME_VERSION="$(RUNTIME_VERSION)" \
--build-arg PKG_VERS="$(VERSION)" \
--build-arg PKG_REV="$(PKG_REV)" \
-t "nvidia/nvidia-docker2/centos:7" -f Dockerfile.centos .
$(MKDIR) -p $(DIST_DIR)/centos7/$(ARCH)
$(DOCKER) run --cidfile [email protected] "nvidia/nvidia-docker2/centos:7"
$(DOCKER) cp $$(cat [email protected]):/dist/. $(DIST_DIR)/centos7/$(ARCH)
$(DOCKER) rm $$(cat [email protected]) && rm [email protected]
amzn2: ARCH := x86_64
amzn2:
$(DOCKER) build --build-arg VERSION_ID="2" \
--build-arg DOCKER_VERSION="docker >= 18.06.1ce-2.amzn2" \
--build-arg RUNTIME_VERSION="$(RUNTIME_VERSION)" \
--build-arg PKG_VERS="$(VERSION)" \
--build-arg PKG_REV="$(PKG_REV)" \
-t "nvidia/nvidia-docker2/amzn:2-docker" -f Dockerfile.amzn .
$(MKDIR) -p $(DIST_DIR)/amzn2/$(ARCH)
$(DOCKER) run --cidfile [email protected] "nvidia/nvidia-docker2/amzn:2-docker"
$(DOCKER) cp $$(cat [email protected]):/dist/. $(DIST_DIR)/amzn2/$(ARCH)
$(DOCKER) rm $$(cat [email protected]) && rm [email protected]
amzn1: ARCH := x86_64
amzn1:
$(DOCKER) build --build-arg VERSION_ID="1" \
--build-arg DOCKER_VERSION="docker >= 18.06.1ce-2.16.amzn1" \
--build-arg RUNTIME_VERSION="$(RUNTIME_VERSION)" \
--build-arg PKG_VERS="$(VERSION)" \
--build-arg PKG_REV="$(PKG_REV)" \
-t "nvidia/nvidia-docker2/amzn:1" -f Dockerfile.amzn .
$(MKDIR) -p $(DIST_DIR)/amzn1/$(ARCH)
$(DOCKER) run --cidfile [email protected] "nvidia/nvidia-docker2/amzn:1"
$(DOCKER) cp $$(cat [email protected]):/dist/. $(DIST_DIR)/amzn1/$(ARCH)
$(DOCKER) rm $$(cat [email protected]) && rm [email protected]