mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-24 21:14:00 +00:00
Merge branch 'fix-kitmaker' into 'main'
Add additional build args to manifest See merge request nvidia/container-toolkit/container-toolkit!279
This commit is contained in:
commit
763e4936cd
@ -18,19 +18,22 @@ ARG GOLANG_VERSION=x.x.x
|
|||||||
|
|
||||||
FROM nvidia/cuda:${CUDA_VERSION}-base-${BASE_DIST}
|
FROM nvidia/cuda:${CUDA_VERSION}-base-${BASE_DIST}
|
||||||
|
|
||||||
ARG VERSION="N/A"
|
|
||||||
|
|
||||||
ARG ARTIFACTS_ROOT
|
ARG ARTIFACTS_ROOT
|
||||||
COPY ${ARTIFACTS_ROOT} /artifacts/packages/
|
COPY ${ARTIFACTS_ROOT} /artifacts/packages/
|
||||||
|
|
||||||
WORKDIR /artifacts/packages
|
WORKDIR /artifacts/packages
|
||||||
|
|
||||||
|
# build-args are added to the manifest.txt file below.
|
||||||
|
ARG BASE_DIST
|
||||||
|
ARG PACKAGE_DIST
|
||||||
|
ARG PACKAGE_VERSION
|
||||||
ARG GIT_BRANCH
|
ARG GIT_BRANCH
|
||||||
ARG GIT_COMMIT
|
ARG GIT_COMMIT
|
||||||
ARG SOURCE_DATE_EPOCH
|
ARG SOURCE_DATE_EPOCH
|
||||||
|
ARG VERSION
|
||||||
|
|
||||||
# Create a manifest.txt file with the absolute paths of all deb and rpm packages in the container
|
# Create a manifest.txt file with the absolute paths of all deb and rpm packages in the container
|
||||||
RUN echo "IMAGE_EPOCH=$(date '+%s')" | sed 's/^/#/g' > /artifacts/manifest.txt && \
|
RUN echo "#IMAGE_EPOCH=$(date '+%s')" > /artifacts/manifest.txt && \
|
||||||
env | sed 's/^/#/g' >> /artifacts/manifest.txt && \
|
env | sed 's/^/#/g' >> /artifacts/manifest.txt && \
|
||||||
find /artifacts/packages -iname '*.deb' -o -iname '*.rpm' >> /artifacts/manifest.txt
|
find /artifacts/packages -iname '*.deb' -o -iname '*.rpm' >> /artifacts/manifest.txt
|
||||||
|
|
||||||
|
@ -75,9 +75,10 @@ function extract_info() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IMAGE_EPOCH=$(extract_info "IMAGE_EPOCH")
|
IMAGE_EPOCH=$(extract_info "IMAGE_EPOCH")
|
||||||
GIT_BRANCH=$(extract_info "GIT_BRANCH")
|
# Note we use the main branch for the kitmaker archive.
|
||||||
|
GIT_BRANCH=main
|
||||||
GIT_COMMIT=$(extract_info "GIT_COMMIT")
|
GIT_COMMIT=$(extract_info "GIT_COMMIT")
|
||||||
VERSION=$(extract_info "VERSION")
|
VERSION=$(extract_info "PACKAGE_VERSION")
|
||||||
|
|
||||||
|
|
||||||
# add_distro adds the specified component, os, and arch to the .package folder from which a kitmaker archive is generated.
|
# add_distro adds the specified component, os, and arch to the .package folder from which a kitmaker archive is generated.
|
||||||
|
Loading…
Reference in New Issue
Block a user