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

Commit 9ea83df

Browse files
committed
Add support for Amazon Linux v1
Thanks @ramarnat! Closes: #622
1 parent 7a6370d commit 9ea83df

File tree

2 files changed

+63
-1
lines changed

2 files changed

+63
-1
lines changed

Dockerfile.amzn1

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
FROM amazonlinux:1
2+
3+
# packaging dependencies
4+
RUN yum install -y \
5+
rpm-build && \
6+
rm -rf /var/cache/yum/*
7+
8+
# packaging
9+
ARG PKG_VERS
10+
ARG PKG_REV
11+
ARG RUNTIME_VERSION
12+
ARG DOCKER_VERSION
13+
14+
ENV VERSION $PKG_VERS
15+
ENV RELEASE $PKG_REV
16+
ENV RUNTIME_VERSION $RUNTIME_VERSION
17+
ENV DOCKER_VERSION $DOCKER_VERSION
18+
19+
# output directory
20+
ENV DIST_DIR=/tmp/nvidia-container-runtime-$PKG_VERS/SOURCES
21+
RUN mkdir -p $DIST_DIR
22+
23+
COPY nvidia-docker $DIST_DIR
24+
COPY daemon.json $DIST_DIR
25+
26+
WORKDIR $DIST_DIR/..
27+
COPY rpm .
28+
29+
CMD rpmbuild --clean -bb \
30+
-D "_topdir $PWD" \
31+
-D "version $VERSION" \
32+
-D "release $RELEASE" \
33+
-D "runtime_version $RUNTIME_VERSION" \
34+
-D "docker_version $DOCKER_VERSION" \
35+
SPECS/nvidia-docker2.spec && \
36+
mv RPMS/noarch/*.rpm /dist

Makefile

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ DIST_DIR := $(CURDIR)/dist
1111
.NOTPARALLEL:
1212
.PHONY: all
1313

14-
all: xenial centos7 stretch
14+
all: xenial centos7 stretch amzn1
1515

1616
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
1717

1818
centos7: 17.12.1.ce-centos7 17.12.0.ce-centos7 17.09.1.ce-centos7 17.09.0.ce-centos7 17.06.2.ce-centos7 17.03.2.ce-centos7 1.13.1-centos7 1.12.6-centos7
1919

2020
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
2121

22+
amzn1: 17.09.1.ce-amzn1 17.06.2.ce-amzn1 17.03.2.ce-amzn1
23+
2224
17.12.1-xenial:
2325
$(DOCKER) build --build-arg RUNTIME_VERSION="$(RUNTIME_VERSION)+docker17.12.1-1" \
2426
--build-arg DOCKER_VERSION="docker-ce (= 17.12.1~ce-0~ubuntu) | docker-ee (= 17.12.1~ee-0~ubuntu)" \
@@ -194,3 +196,27 @@ stretch: 17.12.1-stretch 17.12.0-stretch 17.09.1-stretch 17.09.0-stretch 17.06.2
194196
--build-arg PKG_REV="$(PKG_REV)" \
195197
-t nvidia-docker2:$@ -f Dockerfile.stretch .
196198
$(DOCKER) run --rm -v $(DIST_DIR)/stretch:/dist:Z nvidia-docker2:$@
199+
200+
17.09.1.ce-amzn1:
201+
$(DOCKER) build --build-arg RUNTIME_VERSION="$(RUNTIME_VERSION)-1.docker17.09.1.amzn1" \
202+
--build-arg DOCKER_VERSION="docker = 17.09.1ce" \
203+
--build-arg PKG_VERS="$(VERSION)" \
204+
--build-arg PKG_REV="$(PKG_REV).docker17.09.1.ce.amzn1" \
205+
-t nvidia-docker2:$@ -f Dockerfile.amzn1 .
206+
$(DOCKER) run --rm -v $(DIST_DIR)/amzn1:/dist:Z nvidia-docker2:$@
207+
208+
17.06.2.ce-amzn1:
209+
$(DOCKER) build --build-arg RUNTIME_VERSION="$(RUNTIME_VERSION)-1.docker17.06.2.amzn1" \
210+
--build-arg DOCKER_VERSION="docker = 17.06.2ce" \
211+
--build-arg PKG_VERS="$(VERSION)" \
212+
--build-arg PKG_REV="$(PKG_REV).docker17.06.2.ce.amzn1" \
213+
-t nvidia-docker2:$@ -f Dockerfile.amzn1 .
214+
$(DOCKER) run --rm -v $(DIST_DIR)/amzn1:/dist:Z nvidia-docker2:$@
215+
216+
17.03.2.ce-amzn1:
217+
$(DOCKER) build --build-arg RUNTIME_VERSION="$(RUNTIME_VERSION)-1.docker17.03.2.amzn1" \
218+
--build-arg DOCKER_VERSION="docker = 17.03.2ce" \
219+
--build-arg PKG_VERS="$(VERSION)" \
220+
--build-arg PKG_REV="$(PKG_REV).docker17.03.2.ce.amzn1" \
221+
-t nvidia-docker2:$@ -f Dockerfile.amzn1 .
222+
$(DOCKER) run --rm -v $(DIST_DIR)/amzn1:/dist:Z nvidia-docker2:$@

0 commit comments

Comments
 (0)