Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 946681 - app-containers/docker: add dependency on video_cards_nvidia for app-containers/nvidia-container-toolkit?
Summary: app-containers/docker: add dependency on video_cards_nvidia for app-containe...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-20 04:54 UTC by Zhixu Liu
Modified: 2024-12-25 20:14 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zhixu Liu 2024-12-20 04:54:23 UTC
should we add a dependency on video_cards_nvidia (provided by app-containers/nvidia-container-toolkit) so user can access nvidia gpu from docker?

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-20 10:27:35 UTC
Or perhaps USE=cuda (not sure what's better here).
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-20 10:30:41 UTC
(In reply to Sam James from comment #1)
> Or perhaps USE=cuda (not sure what's better here).

To elaborate: ... because this would mean that rather than all nvidia graphics + docker users having nvidia-container-toolkit pulled in, it would be restricted to those interested in cuda, and other packages have USE=cuda too.
Comment 3 William Hubbs gentoo-dev 2024-12-25 02:47:24 UTC
Is this an optional runtime dependency?

If so, I think I should use optfeature instead of a use flag.

Thoughts?

William
Comment 4 Zhixu Liu 2024-12-25 03:01:29 UTC
(In reply to William Hubbs from comment #3)
> Is this an optional runtime dependency?
> 
> If so, I think I should use optfeature instead of a use flag.
> 
yes, it's a runtime dependency, following error if w/o this package:

# docker run --gpus all -it --rm [any image] id
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

BTW, what's optfeature?
Comment 5 Zhixu Liu 2024-12-25 08:22:46 UTC
after read the doc of optfeature, it seems it just tell user some extra package(s) available?
Comment 6 William Hubbs gentoo-dev 2024-12-25 18:14:37 UTC
Yes, optfeature is for displaying packages that need to be installed for
optional runtime features.

But,  let me take  look again, I haven't seen the error you pasted into
your last comment.
Comment 7 Larry the Git Cow gentoo-dev 2024-12-25 20:14:06 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=896e667b8800510d00e6aab36f94110682515a4d

commit 896e667b8800510d00e6aab36f94110682515a4d
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2024-12-25 18:51:11 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2024-12-25 20:01:21 +0000

    app-containers/docker:  27.4.1-r1 revbump
    
    - add support for nvidia gpu access via the cuda use flag
    - fix the docker-runc symlink
    - fix a file collision with old versions of docker-cli
    
    Closes: https://bugs.gentoo.org/946681
    Closes: https://bugs.gentoo.org/946684
    Closes: https://bugs.gentoo.org/946694
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 app-containers/docker/docker-27.4.1-r1.ebuild | 331 ++++++++++++++++++++++++++
 1 file changed, 331 insertions(+)