Closed ccauet closed 4 years ago
Problem solved. I was setting
c.SystemdSpawner.isolate_devices = True
this seemed clever to me in the past, but now when trying to use GPUs was getting in my way.
Would it be possible to use c.SystemdSpawner.isolate_devices = True
and also access gpus? Would it be possible to explicitly mount nvidia device files? If so, how would that be done?
@kaczmarj yes, might be, see the answer on SO
I am not sure... but I can provide pointers to documentation. Setting
c.SystemdSpawner.isolate_devices = True
setsPrivateDevices=yes
in the eventualsystemd-run
call (source). Refer to the systemd documentation for more information on thePrivateDevices
option.You might be able to keep
isolate_devices = True
and then explicitly mount the nvidia devices. Though I don't know how to do this...
I wrote that answer :) was wondering if anyone had more information on the problem because I don’t have experience with systemd.
On Feb 16, 2020, at 5:48 PM, Christophe Cauet notifications@github.com wrote:
@kaczmarj yes, might be, see the answer on SO
I am not sure... but I can provide pointers to documentation. Setting c.SystemdSpawner.isolate_devices = True sets PrivateDevices=yes in the eventual systemd-run call (source). Refer to the systemd documentation for more information on the PrivateDevices option.
You might be able to keep isolate_devices = True and then explicitly mount the nvidia devices. Though I don't know how to do this...
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
I wrote that answer :)
😂 nevermind, wasn't able to match usernames...
(this is a crossposting to SO, the jupyterhub issue tracker and the jupyterhub/systemdspawner issue tracker)
I have a private JupyterHub Setup using a
SystemdSpawner
where I try to run tensorflow with gpu support.I followed the tensorflow instructions and alternatively tried a already provisioned AWS AMI (Deep Learning Base AMI (Ubuntu 18.04) Version 21.0) with NDVIDIA, both on AWS EC2 g4 instances.
On both setups I'm able to use tensorflow with gpu support in an (i)python 3.6 shell
(some warnings about NUMA node, but the gpu is found)
Also using
nvidia-smi
anddeviceQuery
shows the gpu:Now I start the JupyterHub, login, and open a terminal, there I get:
and
and also
I suspect some kind of "sandbox", missing ENV vars, etc. due to that the gpu drivers are not found inside the singleuser environment and subsequently the tensorflow gpu support does not work.
Any ideas on this? Probably it is either a small configuration tweak or due to the architecture not solvable at all ;)