jupyterhub 无法访问 GPU

jupyterhub 无法访问 GPU

平台:x86_64、Ubuntu 22.04.4 LTS、5.15.0-101-generic、jupyterhub 2.0.0+ds1-2

jupyterhub我已经从官方 Ubuntu 软件存储库(软件包)安装了它jupyterhub。这样就可以了,我可以登录并运行 Python 代码。在 jupyterhub 中,我使用的 Python 版本与我的系统 Python 相同。我认为这不是安装了不同版本的库的问题。

PyTorch例如,我可以从多个用户的控制台(包括 IPython 内部)获取 GPU 访问权限:

moo@hostname:~$ ipython3
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.8.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import torch
In [2]: torch.cuda.is_available()
Out[2]: True

但它在 jupyterhub 中不起作用:

import torch
torch.cuda.is_available()

False

这似乎是 jupyterhub 权限/访问方面的问题。在 jupyterhub 内部:

!nvidia-smi

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

当我在 jupyter 中运行时,这在来自用户的控制台上运行良好!whoami

有人知道下一步该尝试什么吗?

相关内容