Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 687098 - nvidia-docker version 2 support
Summary: nvidia-docker version 2 support
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-31 21:01 UTC by Ladislav Zitka
Modified: 2019-06-01 16:30 UTC (History)
1 user (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 Ladislav Zitka 2019-05-31 21:01:46 UTC
Some of the projects in the wild need nvidia-docker 2, any plans to bump this package in Gentoo?
Comment 1 Jonas Stein gentoo-dev 2019-05-31 22:07:39 UTC
which packages exactly?
please write the full category/package name in the summary
Comment 2 Ladislav Zitka 2019-06-01 16:30:19 UTC
Ah, sry, sure.

I open this request to provide in Gentoo support for nvidia docker project which allows one to use GPU devices within the docker containers.

There exist 2 ebuilds for version 1, which is becoming now obsolete:
1. https://data.gpo.zugaina.org/cynede/app-admin/nvidia-docker/
2. another binary version is in ros-overlay under name:sci-libs/nvidia-docker-bin

But this request is to support in Gentoo version 2.

Now the problem is the packaging supports at moment only deb and rpm based distributions.

Main site is here:
https://nvidia.github.io/nvidia-docker/
Wiki:
https://github.com/NVIDIA/nvidia-docker/wiki

there are discussions about how to build for other distros:
https://github.com/NVIDIA/nvidia-docker/issues/553
https://github.com/NVIDIA/nvidia-container-runtime/issues/9

Especially this part from second issue above is important, but I didn't test it yet:
They are not private repos. They are public package repositories from NVIDIA. They are just not controlled by Red Hat/Canonical.

For libnvidia-container, use the tarball here:
https://github.com/NVIDIA/libnvidia-container/releases/tag/v1.0.0-rc.2
And instructions are here:
https://nvidia.github.io/libnvidia-container/

For nvidia-container-runtime-hook, there is a static binary here:
https://github.com/NVIDIA/nvidia-container-runtime/releases/tag/v1.4.0-1
Install it somewhere in your PATH.

If you are using a container tool that can handle OCI hooks directly like runc, CRI-O or podman, you can stop here. You are ready to go.

If you are using docker, there is one extra step: install runc after applying this patch:
https://github.com/NVIDIA/nvidia-container-runtime/blob/master/runtime/runc/3f2f8b84a77f73d38244dd690525642a72156c64/0001-Add-prestart-hook-nvidia-container-runtime-hook-to-t.patch
Rename the generated binary from runc to nvidia-container-runtime then register it to the docker daemon:
https://github.com/nvidia/nvidia-container-runtime#docker-engine-setup