Merge pull request #230992 from ShamrockLee/singularity-nvidia
apptainer, singularity: fix wrapper PATH prefix
This commit is contained in:
commit
430b94c3a2
|
@ -207,12 +207,16 @@ in
|
||||||
substituteInPlace "$out/bin/run-singularity" \
|
substituteInPlace "$out/bin/run-singularity" \
|
||||||
--replace "/usr/bin/env ${projectName}" "$out/bin/${projectName}"
|
--replace "/usr/bin/env ${projectName}" "$out/bin/${projectName}"
|
||||||
wrapProgram "$out/bin/${projectName}" \
|
wrapProgram "$out/bin/${projectName}" \
|
||||||
--prefix PATH : "''${defaultPathInputs// /\/bin:}"
|
--prefix PATH : "''${defaultPathInputs// /\/bin:}''${defaultPathInputs:+/bin:}"
|
||||||
# Make changes in the config file
|
# Make changes in the config file
|
||||||
${lib.optionalString enableNvidiaContainerCli ''
|
${lib.optionalString enableNvidiaContainerCli ''
|
||||||
substituteInPlace "$out/etc/${projectName}/${projectName}.conf" \
|
substituteInPlace "$out/etc/${projectName}/${projectName}.conf" \
|
||||||
--replace "use nvidia-container-cli = no" "use nvidia-container-cli = yes"
|
--replace "use nvidia-container-cli = no" "use nvidia-container-cli = yes"
|
||||||
''}
|
''}
|
||||||
|
${lib.optionalString (enableNvidiaContainerCli && projectName == "singularity") ''
|
||||||
|
substituteInPlace "$out/etc/${projectName}/${projectName}.conf" \
|
||||||
|
--replace "# nvidia-container-cli path =" "nvidia-container-cli path = ${nvidia-docker}/bin/nvidia-container-cli"
|
||||||
|
''}
|
||||||
${lib.optionalString (removeCompat && (projectName != "singularity")) ''
|
${lib.optionalString (removeCompat && (projectName != "singularity")) ''
|
||||||
unlink "$out/bin/singularity"
|
unlink "$out/bin/singularity"
|
||||||
for file in "$out"/share/man/man?/singularity*.gz; do
|
for file in "$out"/share/man/man?/singularity*.gz; do
|
||||||
|
|
Loading…
Reference in a new issue