mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-07-25 22:49:59 +00:00
fixup! build: consume guest-components CoCo artefacts instead of building locally
This commit is contained in:
@@ -161,6 +161,16 @@ setup_nvidia_gpu_rootfs_stage_one() {
|
||||
mount --make-rslave ./dev
|
||||
mount -t proc /proc ./proc
|
||||
|
||||
# setup_rootfs() leaves an empty /etc/resolv.conf so the agent can bind-mount
|
||||
# container DNS into the guest. That breaks name resolution inside this chroot
|
||||
# when fetching NVIDIA packages, so temporarily copy the host DNS config into
|
||||
# the rootfs only. Never touch the host /etc/resolv.conf.
|
||||
local rootfs_resolv="${ROOTFS_DIR}/etc/resolv.conf"
|
||||
[[ -n "${ROOTFS_DIR}" && "${ROOTFS_DIR}" != "/" && -d "${ROOTFS_DIR}/etc" ]] \
|
||||
|| die "nvidia: refusing to modify resolv.conf: invalid ROOTFS_DIR='${ROOTFS_DIR:-}'"
|
||||
rm -f "${rootfs_resolv}"
|
||||
cp --remove-destination /etc/resolv.conf "${rootfs_resolv}"
|
||||
|
||||
local cuda_repo_url cuda_repo_pkg gpu_base_os_version ctk_version
|
||||
cuda_repo_url=$(get_package_version_from_kata_yaml "externals.nvidia.cuda.repo.${machine_arch}.url")
|
||||
cuda_repo_pkg=$(get_package_version_from_kata_yaml "externals.nvidia.cuda.repo.${machine_arch}.pkg")
|
||||
@@ -177,6 +187,10 @@ setup_nvidia_gpu_rootfs_stage_one() {
|
||||
umount -R ./dev
|
||||
umount ./proc
|
||||
|
||||
# Restore the empty resolv.conf for the stage-one tarball / final guest image.
|
||||
rm -f "${rootfs_resolv}"
|
||||
touch "${rootfs_resolv}"
|
||||
|
||||
rm ./nvidia_chroot.sh
|
||||
|
||||
tar cfa "${stage_one}.tar.zst" --remove-files -- *
|
||||
|
||||
Reference in New Issue
Block a user