Skip to content

Commit

Permalink
init: add /run/host/etc to nvidia search path for integration. Fix #848
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
  • Loading branch information
89luca89 committed Aug 4, 2023
1 parent 3271f7a commit bdf78c3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion distrobox-init
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ EOF
fi
done
# shellcheck disable=SC2086
pacman -S --needed --noconfirm ${install_pkg}
pacman -S --noconfirm ${install_pkg}

This comment has been minimized.

Copy link
@JamiKettunen

JamiKettunen Apr 4, 2024

Contributor

Was there any particular reason to drop --needed?


# Ensure we have tzdata installed and populated, sometimes container
# images blank the zoneinfo directory, so we reinstall the package to
Expand Down Expand Up @@ -1195,6 +1195,17 @@ done
if [ "${nvidia}" -eq 1 ]; then
printf "distrobox: Setting up host's nvidia drivers integration...\n"

# First we find all non-lib files we need in /etc/
# - confs
# - icd files
# - egl files
NVIDIA_ETC="$(find /run/host/etc/ \
-type f -iname "*nvidia*" -print || :)"
for nvidia_file in ${NVIDIA_ETC}; do
dest_file="$(printf "%s" "${nvidia_file}" | sed 's|/run/host||g')"
mount_bind "${nvidia_file}" "${dest_file}" ro
done

# First we find all non-lib files we need, this includes
# - binaries
# - confs
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/distrobox-ephemeral.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ You can also use [flags from **distrobox-create**](distrobox-create.md) to custo

# SEE ALSO

man distrobox-create
distrobox-create --help
man distrobox-create

# ENVIRONMENT VARIABLES

Expand Down

0 comments on commit bdf78c3

Please sign in to comment.