|
| 1 | +# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | +# |
| 15 | + |
| 16 | +docker: ubuntu18.04 ubuntu16.04 debian10 debian9 centos7 amzn2 amzn1 opensuse-leap15.1 |
| 17 | + |
| 18 | +ubuntu%: SHELL:=/bin/bash |
| 19 | +ubuntu%: |
| 20 | + $(DOCKER) build --build-arg VERSION_ID=$* \ |
| 21 | + --build-arg WITH_LIBELF=$(WITH_LIBELF) \ |
| 22 | + --build-arg WITH_TIRPC=$(WITH_TIRPC) \ |
| 23 | + --build-arg WITH_SECCOMP=$(WITH_SECCOMP) \ |
| 24 | + -t nvidia/$(LIB_NAME)/ubuntu:$* -f $(MAKE_DIR)/Dockerfile.ubuntu . |
| 25 | + $(MKDIR) -p $(DIST_DIR)/ubuntu$*/$(ARCH) |
| 26 | + $(DOCKER) run --cidfile $@.cid -e DISTRIB -e SECTION nvidia/$(LIB_NAME)/ubuntu:$* |
| 27 | + $(DOCKER) cp $$(cat $@.cid):/mnt/. $(DIST_DIR)/ubuntu$*/$(ARCH) |
| 28 | + $(DOCKER) rm $$(cat $@.cid) && rm $@.cid |
| 29 | + |
| 30 | +debian%: SHELL:=/bin/bash |
| 31 | +debian%: |
| 32 | + $(DOCKER) build --build-arg VERSION_ID=$* \ |
| 33 | + --build-arg WITH_LIBELF=$(WITH_LIBELF) \ |
| 34 | + --build-arg WITH_TIRPC=$(WITH_TIRPC) \ |
| 35 | + --build-arg WITH_SECCOMP=$(WITH_SECCOMP) \ |
| 36 | + -t nvidia/$(LIB_NAME)/debian:$* -f $(MAKE_DIR)/Dockerfile.debian . |
| 37 | + $(MKDIR) -p $(DIST_DIR)/debian$*/$(ARCH) |
| 38 | + $(DOCKER) run --cidfile $@.cid -e DISTRIB -e SECTION nvidia/$(LIB_NAME)/debian:$* |
| 39 | + $(DOCKER) cp $$(cat $@.cid):/mnt/. $(DIST_DIR)/debian$*/$(ARCH) |
| 40 | + $(DOCKER) rm $$(cat $@.cid) && rm $@.cid |
| 41 | + |
| 42 | +centos%: SHELL:=/bin/bash |
| 43 | +centos%: |
| 44 | + $(DOCKER) build --build-arg VERSION_ID=$* \ |
| 45 | + --build-arg WITH_LIBELF=$(WITH_LIBELF) \ |
| 46 | + --build-arg WITH_TIRPC=$(WITH_TIRPC) \ |
| 47 | + --build-arg WITH_SECCOMP=$(WITH_SECCOMP) \ |
| 48 | + -t nvidia/$(LIB_NAME)/centos:$* -f $(MAKE_DIR)/Dockerfile.centos . |
| 49 | + $(MKDIR) -p $(DIST_DIR)/centos$*/$(ARCH) |
| 50 | + $(DOCKER) run --cidfile $@.cid -e DISTRIB -e SECTION nvidia/$(LIB_NAME)/centos:$* |
| 51 | + $(DOCKER) cp $$(cat $@.cid):/mnt/. $(DIST_DIR)/centos$*/$(ARCH) |
| 52 | + $(DOCKER) rm $$(cat $@.cid) && rm $@.cid |
| 53 | + |
| 54 | +amazonlinux%: SHELL:=/bin/bash |
| 55 | +amazonlinux%: |
| 56 | + $(DOCKER) build --build-arg VERSION_ID=$* \ |
| 57 | + --build-arg WITH_LIBELF=$(WITH_LIBELF) \ |
| 58 | + --build-arg WITH_TIRPC=$(WITH_TIRPC) \ |
| 59 | + --build-arg WITH_SECCOMP=$(WITH_SECCOMP) \ |
| 60 | + -t nvidia/$(LIB_NAME)/amazonlinux:$* -f $(MAKE_DIR)/Dockerfile.amazonlinux . |
| 61 | + $(MKDIR) -p $(DIST_DIR)/amazonlinux$*/$(ARCH) |
| 62 | + $(DOCKER) run --cidfile $@.cid -e DISTRIB -e SECTION nvidia/$(LIB_NAME)/amazonlinux:$* |
| 63 | + $(DOCKER) cp $$(cat $@.cid):/mnt/. $(DIST_DIR)/amazonlinux$*/$(ARCH) |
| 64 | + $(DOCKER) rm $$(cat $@.cid) && rm $@.cid |
| 65 | + |
| 66 | + |
| 67 | +opensuse-leap%: SHELL:=/bin/bash |
| 68 | +opensuse-leap%: |
| 69 | + $(DOCKER) build --build-arg VERSION_ID=$* \ |
| 70 | + --build-arg WITH_LIBELF=$(WITH_LIBELF) \ |
| 71 | + --build-arg WITH_TIRPC=$(WITH_TIRPC) \ |
| 72 | + --build-arg WITH_SECCOMP=$(WITH_SECCOMP) \ |
| 73 | + -t nvidia/$(LIB_NAME)/opensuse-leap:$* -f $(MAKE_DIR)/Dockerfile.opensuse-leap . |
| 74 | + $(MKDIR) -p $(DIST_DIR)/opensuse-leap$*/$(ARCH) |
| 75 | + $(DOCKER) run --cidfile $@.cid -e DISTRIB -e SECTION nvidia/$(LIB_NAME)/opensuse-leap:$* |
| 76 | + $(DOCKER) cp $$(cat $@.cid):/mnt/. $(DIST_DIR)/opensuse-leap$*/$(ARCH) |
| 77 | + $(DOCKER) rm $$(cat $@.cid) && rm $@.cid |
0 commit comments