apptainer: allow --nvccli with read-only images

(cherry picked from commit 07305dff4f2de16df1532e846d1365b3660146ac)
This commit is contained in:
Someone Serge
2024-01-10 17:39:50 +00:00
parent f4474ec730
commit c76883f955
@@ -175,11 +175,18 @@ in
if [[ ! -e .git || ! -e VERSION ]]; then
echo "${version}" > VERSION
fi
# Patch shebangs for script run during build
patchShebangs --build "$configureScript" makeit e2e scripts mlocal/scripts
# Patching the hard-coded defaultPath by prefixing the packages in defaultPathInputs
substituteInPlace cmd/internal/cli/actions.go \
--replace "defaultPath = \"${defaultPathOriginal}\"" "defaultPath = \"''${defaultPathInputs// /\/bin:}''${defaultPathInputs:+/bin:}${defaultPathOriginal}\""
substituteInPlace internal/pkg/util/gpu/nvidia.go \
--replace \
'return fmt.Errorf("/usr/bin not writable in the container")' \
""
'';
postConfigure = ''