mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 00:08:11 +00:00
Include all architecture packages in toolkit container
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
f10f533fb2
commit
7fb04878c7
@ -242,9 +242,8 @@ image-ubuntu18.04:
|
|||||||
- .dist-ubuntu18.04
|
- .dist-ubuntu18.04
|
||||||
needs:
|
needs:
|
||||||
- package-ubuntu18.04-amd64
|
- package-ubuntu18.04-amd64
|
||||||
# TODO: These will be required once we generate multi-arch images
|
- package-ubuntu18.04-arm64
|
||||||
# - package-ubuntu18.04-arm64
|
- package-ubuntu18.04-ppc64le
|
||||||
# - package-ubuntu18.04-ppc64le
|
|
||||||
script:
|
script:
|
||||||
- make -f build/container/Makefile build-${DIST}
|
- make -f build/container/Makefile build-${DIST}
|
||||||
- make -f build/container/Makefile push-${DIST}
|
- make -f build/container/Makefile push-${DIST}
|
||||||
|
@ -46,16 +46,17 @@ ENV NVIDIA_DISABLE_REQUIRE="true"
|
|||||||
ENV NVIDIA_VISIBLE_DEVICES=all
|
ENV NVIDIA_VISIBLE_DEVICES=all
|
||||||
ENV NVIDIA_DRIVER_CAPABILITIES=utility
|
ENV NVIDIA_DRIVER_CAPABILITIES=utility
|
||||||
|
|
||||||
|
ARG ARTIFACTS_DIR
|
||||||
|
COPY ${ARTIFACTS_DIR}/ /artifacts/packages/
|
||||||
|
|
||||||
WORKDIR /artifacts/packages
|
WORKDIR /artifacts/packages
|
||||||
|
|
||||||
ARG ARTIFACTS_DIR
|
|
||||||
COPY ${ARTIFACTS_DIR}/* /artifacts/packages/
|
|
||||||
|
|
||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
|
ARG PACKAGE_ARCH
|
||||||
RUN yum localinstall -y \
|
RUN yum localinstall -y \
|
||||||
libnvidia-container1-${PACKAGE_VERSION}*.rpm \
|
${PACKAGE_ARCH}/libnvidia-container1-${PACKAGE_VERSION}*.rpm \
|
||||||
libnvidia-container-tools-${PACKAGE_VERSION}*.rpm \
|
${PACKAGE_ARCH}/libnvidia-container-tools-${PACKAGE_VERSION}*.rpm \
|
||||||
nvidia-container-toolkit-${PACKAGE_VERSION}*.rpm
|
${PACKAGE_ARCH}/nvidia-container-toolkit-${PACKAGE_VERSION}*.rpm
|
||||||
|
|
||||||
WORKDIR /work
|
WORKDIR /work
|
||||||
|
|
||||||
|
@ -52,16 +52,17 @@ ENV NVIDIA_DISABLE_REQUIRE="true"
|
|||||||
ENV NVIDIA_VISIBLE_DEVICES=all
|
ENV NVIDIA_VISIBLE_DEVICES=all
|
||||||
ENV NVIDIA_DRIVER_CAPABILITIES=utility
|
ENV NVIDIA_DRIVER_CAPABILITIES=utility
|
||||||
|
|
||||||
|
ARG ARTIFACTS_DIR
|
||||||
|
COPY ${ARTIFACTS_DIR}/ /artifacts/packages/
|
||||||
|
|
||||||
WORKDIR /artifacts/packages
|
WORKDIR /artifacts/packages
|
||||||
|
|
||||||
ARG ARTIFACTS_DIR
|
|
||||||
COPY ${ARTIFACTS_DIR}/* /artifacts/packages/
|
|
||||||
|
|
||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
|
ARG PACKAGE_ARCH
|
||||||
RUN dpkg -i \
|
RUN dpkg -i \
|
||||||
libnvidia-container1_${PACKAGE_VERSION}*.deb \
|
${PACKAGE_ARCH}/libnvidia-container1_${PACKAGE_VERSION}*.deb \
|
||||||
libnvidia-container-tools_${PACKAGE_VERSION}*.deb \
|
${PACKAGE_ARCH}/libnvidia-container-tools_${PACKAGE_VERSION}*.deb \
|
||||||
nvidia-container-toolkit_${PACKAGE_VERSION}*.deb
|
${PACKAGE_ARCH}/nvidia-container-toolkit_${PACKAGE_VERSION}*.deb
|
||||||
|
|
||||||
WORKDIR /work
|
WORKDIR /work
|
||||||
|
|
||||||
|
@ -58,22 +58,26 @@ build-%: DOCKERFILE = $(CURDIR)/build/container/Dockerfile.$(DOCKERFILE_SUFFIX)
|
|||||||
|
|
||||||
# Use a generic build target to build the relevant images
|
# Use a generic build target to build the relevant images
|
||||||
$(BUILD_TARGETS): build-%: $(ARTIFACTS_DIR)
|
$(BUILD_TARGETS): build-%: $(ARTIFACTS_DIR)
|
||||||
$(DOCKER) build --pull \
|
DOCKER_BUILDKIT=1 \
|
||||||
|
$(DOCKER) build --platform=linux/amd64 --pull \
|
||||||
--tag $(IMAGE) \
|
--tag $(IMAGE) \
|
||||||
--build-arg ARTIFACTS_DIR="$(ARTIFACTS_DIR)" \
|
--build-arg ARTIFACTS_DIR="$(ARTIFACTS_DIR)" \
|
||||||
--build-arg BASE_DIST="$(BASE_DIST)" \
|
--build-arg BASE_DIST="$(BASE_DIST)" \
|
||||||
--build-arg CUDA_VERSION="$(CUDA_VERSION)" \
|
--build-arg CUDA_VERSION="$(CUDA_VERSION)" \
|
||||||
--build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \
|
--build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \
|
||||||
--build-arg PACKAGE_VERSION="$(PACKAGE_VERSION)" \
|
--build-arg PACKAGE_VERSION="$(PACKAGE_VERSION)" \
|
||||||
|
--build-arg PACKAGE_ARCH="$(PACKAGE_ARCH)" \
|
||||||
--build-arg VERSION="$(VERSION)" \
|
--build-arg VERSION="$(VERSION)" \
|
||||||
-f $(DOCKERFILE) \
|
-f $(DOCKERFILE) \
|
||||||
$(CURDIR)
|
$(CURDIR)
|
||||||
|
|
||||||
|
|
||||||
ARTIFACTS_ROOT ?= $(shell realpath --relative-to=$(CURDIR) $(DIST_DIR))
|
ARTIFACTS_ROOT ?= $(shell realpath --relative-to=$(CURDIR) $(DIST_DIR))
|
||||||
|
ARTIFACTS_DIR = $(ARTIFACTS_ROOT)/$(*)
|
||||||
|
|
||||||
|
PACKAGE_ARCH = amd64
|
||||||
|
|
||||||
build-ubuntu%: DOCKERFILE_SUFFIX := ubuntu
|
build-ubuntu%: DOCKERFILE_SUFFIX := ubuntu
|
||||||
build-ubuntu%: ARTIFACTS_DIR = $(ARTIFACTS_ROOT)/$(*)/amd64
|
|
||||||
build-ubuntu%: PACKAGE_VERSION := $(LIB_VERSION)$(if $(LIB_TAG),~$(LIB_TAG))
|
build-ubuntu%: PACKAGE_VERSION := $(LIB_VERSION)$(if $(LIB_TAG),~$(LIB_TAG))
|
||||||
|
|
||||||
build-ubuntu18.04: BASE_DIST := ubuntu18.04
|
build-ubuntu18.04: BASE_DIST := ubuntu18.04
|
||||||
@ -81,13 +85,14 @@ build-ubuntu20.04: BASE_DIST := ubuntu20.04
|
|||||||
|
|
||||||
build-ubi8: DOCKERFILE_SUFFIX := centos
|
build-ubi8: DOCKERFILE_SUFFIX := centos
|
||||||
# TODO: Update this to use the centos8 packages
|
# TODO: Update this to use the centos8 packages
|
||||||
build-ubi8: ARTIFACTS_DIR = $(ARTIFACTS_ROOT)/centos7/x86_64
|
build-ubi8: ARTIFACTS_DIR = $(ARTIFACTS_ROOT)/centos7
|
||||||
build-ubi8: PACKAGE_VERSION := $(LIB_VERSION)-$(if $(LIB_TAG),0.1.$(LIB_TAG),1)
|
build-ubi8: PACKAGE_VERSION := $(LIB_VERSION)-$(if $(LIB_TAG),0.1.$(LIB_TAG),1)
|
||||||
build-ubi8: BASE_DIST := ubi8
|
build-ubi8: BASE_DIST := ubi8
|
||||||
|
build-ubi8: PACKAGE_ARCH := x86_64
|
||||||
|
|
||||||
build-centos%: DOCKERFILE_SUFFIX := centos
|
build-centos%: DOCKERFILE_SUFFIX := centos
|
||||||
build-centos%: ARTIFACTS_DIR = $(ARTIFACTS_ROOT)/$(*)/x86_64
|
|
||||||
build-centos%: PACKAGE_VERSION := $(LIB_VERSION)-$(if $(LIB_TAG),0.1.$(LIB_TAG),1)
|
build-centos%: PACKAGE_VERSION := $(LIB_VERSION)-$(if $(LIB_TAG),0.1.$(LIB_TAG),1)
|
||||||
|
build-centos%: PACKAGE_ARCH := x86_64
|
||||||
|
|
||||||
build-centos7: BASE_DIST := centos7
|
build-centos7: BASE_DIST := centos7
|
||||||
build-centos8: BASE_DIST := centos8
|
build-centos8: BASE_DIST := centos8
|
||||||
|
Loading…
Reference in New Issue
Block a user