GNU bug report logs - #59069
`guix shell -CN' failed to access GPU

Previous Next

Package: guix;

Reported by: dan <i <at> dan.games>

Date: Sun, 6 Nov 2022 06:47:02 UTC

Severity: normal

Merged with 59166

Full log


Message #14 received at 59069 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: dan <i <at> dan.games>
Cc: 59069 <at> debbugs.gnu.org, David Thompson <davet <at> gnu.org>
Subject: Re: bug#59069: `guix shell -CN' failed to access GPU
Date: Thu, 10 Nov 2022 16:49:00 +0100
Hi!

(Cc: Dave Thompson, the original author of this code.)

As you pointed out on IRC, the problem is that ‘guix shell -C’ provides
/sys whereas ‘guix shell -CN’ doesn’t.

This stems from this call in (gnu build linux-container), which has
always been there:

    (mount-file-systems root mounts
                        #:mount-/proc? (memq 'pid namespaces)
                        #:mount-/sys?  (memq 'net
                                             namespaces))

This is explained a few lines above:

  ;; A sysfs mount requires the user to have the CAP_SYS_ADMIN capability in
  ;; the current network namespace.
  (when mount-/sys?
    (mount* "none" (scope "/sys") "sysfs"
            (logior MS_NOEXEC MS_NOSUID MS_NODEV MS_RDONLY)))

As you noticed with ‘--expose=/sys’, bind-mounting /sys doesn’t work
either (‘mount’ fails with EINVAL).

Not sure what to do.  Thoughts?

Ludo’.




This bug report was last modified 2 years and 218 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.