Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions etc/nvliblist.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# Copyright (c) 2017, SingularityWare, LLC. All rights reserved.
#
# This software is licensed under a 3-clause BSD license. Please
# consult LICENSE file distributed with the sources of this project regarding
# your rights to use or distribute this software.
#
# NVLIBLIST.CONF
# This configuration file determines which NVIDIA libraries to search for on
# the host system when the --nv option is invoked. You can edit it if you have
Expand Down
4 changes: 2 additions & 2 deletions libexec/cli/action_argparser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ while true; do
-n|--nv)
shift
SINGULARITY_NVLIBLIST=$(mktemp singularity-nvliblist.XXXXXXXX)
cat $SINGULARITY_sysconfdir"/singularity/nvliblist.conf" | grep -v "^#" > $SINGULARITY_NVLIBLIST
cat $SINGULARITY_sysconfdir"/singularity/nvliblist.conf" | grep -vE "^#|^\s*$" >$SINGULARITY_NVLIBLIST
for i in $(ldconfig -p | grep -f "${SINGULARITY_NVLIBLIST}"); do
if [ -f "$i" ]; then
message 2 "Found NV library: $i\n"
if [ -z "${SINGULARITY_CONTAINLIBS:-}" ]; then
SINGULARITY_CONTAINLIBS="$i"
else
else
SINGULARITY_CONTAINLIBS="$SINGULARITY_CONTAINLIBS,$i"
fi
fi
Expand Down