Skip to content

Commit

Permalink
singularity: Respect client container LD_LIBRARY_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
spoutn1k committed Mar 30, 2023
1 parent 4d96207 commit a6af604
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions e4s_cl/cf/containers/singularity.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,11 @@ def _prepare(self, command: List[str], overload: bool = True) -> List[str]:
self.add_ld_library_path("/.singularity.d/libs")
self.env.update(
{'SINGULARITYENV_LD_PRELOAD': ":".join(self.ld_preload)})
self.env.update(
{'SINGULARITYENV_LD_LIBRARY_PATH': ":".join(self.ld_lib_path)})

# LD_LIBRARY_PATH override does not respect container's values.
# Enabling this may prevent crashes with nvidia library import
# from singularity (--nv flag) but causes MORE crashes with client containers
# self.env.update({'SINGULARITYENV_LD_LIBRARY_PATH': ":".join(self.ld_lib_path)})
self._format_bound()
nvidia_flag = ['--nv'] if self._has_nvidia() else []

Expand Down

0 comments on commit a6af604

Please sign in to comment.