Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Install nvidia-docker v2 in Gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
BrummieJim
l33t
l33t


Joined: 22 Jul 2005
Posts: 642

PostPosted: Mon Jun 11, 2018 12:05 pm    Post subject: Install nvidia-docker v2 in Gentoo Reply with quote

Hi,
I'm trying to get nvidia-docker working in Genoo, but having problems and it looks unsupported, https://nvidia.github.io/nvidia-docker/ . I'm running x86_64 btw. There's a makefile, but nothing to support a non-deb or rpm OS.

I found an older version in a layman respository, but this won't install; https://gpo.zugaina.org/app-admin/nvidia-docker

Code:
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.37/version: dial unix /var/run/docker.sock: connect: permission denied
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post
    http://%2Fvar%2Frun%2Fdocker.sock/v1.37/build?buildargs=%7B%22CR_EMAIL
    %22%3A%22digits%40nvidia.com%22%2C%22CR_NAME%22%3A%22NVIDIA+CORPORATION
    %22%2C%22PKG_ARCH%22%3A%22amd64%22%2C%22PKG_NAME%22%3A%22
    nvidia-docker%22%2C%22PKG_REV%22%3A%221%22%2C%22PKG_VERS
    %22%3A%221.0.1%22%2C%22USER_ID%22%3A%22250%22%7D&cachefrom=
    %5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=
    &cpusetmems=&cpushares=0&dockerfile=Dockerfile.build&labels=
    %7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=
    463d2bff47b9781290c03b752532cdad18af37eb57889f55582086d72e229b1f&
    shmsize=0&t=nvidia-docker%3Abuild&target=&ulimits=null: dial unix /var/run/docker.sock: connect: permission denied
ERRO[0000] failed to dial gRPC: cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: dial unix /var/run/docker.sock: connect: permission denied
make: *** [Makefile:47: build] Error 1


I did the standard fix for this problem (adding root to the docker group) but to no-avail.

Question is, has anyone else got this working, and if so, how?
Thanks,
James

Replaced 'quote' tags with 'code' tags, and wrapped a long line to make the forum layout behave.Chiitoo
_________________
Intel 2.2 Core 2 Duo, 4Gb Ram, 320GB Sata Drive and Nvidia card.
Back to top
View user's profile Send private message
casimiro
n00b
n00b


Joined: 15 Jun 2018
Posts: 1

PostPosted: Fri Jun 15, 2018 3:59 pm    Post subject: Reply with quote

You can solve this problem by adding the user portage to the group docker. Thus the portage will be able to use the docker client.

However, even after doing that I wasn't able to install nvidia-docker once the docker buld failed on step 11/22.

If you manage to emerge it, please share your magick. =)
Back to top
View user's profile Send private message
lromor
n00b
n00b


Joined: 11 Sep 2018
Posts: 1

PostPosted: Tue Sep 11, 2018 10:57 am    Post subject: Reply with quote

Quote:
However, even after doing that I wasn't able to install nvidia-docker once the docker buld failed on step 11/22.

If you manage to emerge it, please share your magick. =)


Hi, I managed to do that but it required a bit of manual compilation and patches.


First of all, nvidia-docker. You can simply copy paste the ebuild to use a newer version and nvidia-docker will be installed.
For example, in your local portage repo add inside app-admin/nvidia-docker/nvidia-docker-2.0.3.ebuild (which is the latest version that I found in their repo. You don't have to compile it as nvidia-docker it's essentially just bash wrapper.


The main problem though is that it's missing many other dependencies such as:

https://github.com/NVIDIA/libnvidia-container

and docker runtime that will call a hook that will init the libnvidia driver:
https://github.com/NVIDIA/nvidia-container-runtime

Especially this last part is a bit annoying because they are currently facing an issue with distributions that require to be part of the video group in order to access /dev/nvidia*

Fortunately they have a patch for the hook that let's you change the uid of the process spawned by the driver.

Depending on how many people are interested in this, I might write some ebuilds to port it on gentoo.
Back to top
View user's profile Send private message
wanwannodao
n00b
n00b


Joined: 01 Nov 2018
Posts: 1

PostPosted: Thu Nov 01, 2018 2:23 pm    Post subject: Reply with quote

Can you please explain in more detail how you managed this ??

I need nvidia-docker ! and have been stuck in the same issue... Thanks!
Back to top
View user's profile Send private message
archenroot
Apprentice
Apprentice


Joined: 13 Dec 2011
Posts: 188
Location: Lake Macha, Czech republic

PostPosted: Mon Dec 03, 2018 9:28 am    Post subject: Reply with quote

Being at same situation, having ebuild for nvidia-docker v1 only, so going to try to write dummy ebuilds for runtime as well (is some dependency). If I got something blocking me, i will compile from source...
_________________
Emperor wants to control outer space Yoda wants to explore inner space that's the fundamental difference between good and bad sides of the Force
Back to top
View user's profile Send private message
archenroot
Apprentice
Apprentice


Joined: 13 Dec 2011
Posts: 188
Location: Lake Macha, Czech republic

PostPosted: Mon Dec 03, 2018 2:05 pm    Post subject: Reply with quote

Ok, I created some basic ebuild for container library at:
https://github.com/archenroot/gentoo-overlay/tree/master/dev-libs/nvidia-container

But I think this itself is not enough for full runtime, I need to wait for some response from upstream....

If you are interested in help, please look at:
https://github.com/NVIDIA/libnvidia-container/issues/42
_________________
Emperor wants to control outer space Yoda wants to explore inner space that's the fundamental difference between good and bad sides of the Force
Back to top
View user's profile Send private message
archenroot
Apprentice
Apprentice


Joined: 13 Dec 2011
Posts: 188
Location: Lake Macha, Czech republic

PostPosted: Mon Dec 03, 2018 3:09 pm    Post subject: Reply with quote

I am in the middle of decision to create a build for:
https://looking-glass.hostfission.com/

And passtrough GPU into VM(with either deb or rpm based distro) :-) to make things working haha
_________________
Emperor wants to control outer space Yoda wants to explore inner space that's the fundamental difference between good and bad sides of the Force
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum