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
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