update gpu

This commit is contained in:
2024-01-28 19:10:23 +08:00

View File

@@ -39,7 +39,7 @@ c.DockerSpawner.remove = True
c.DockerSpawner.debug = True
# User containers will access hub by container name on the Docker network
c.JupyterHub.hub_ip = "jupyterhub"
c.JupyterHub.hub_ip = 'jupyterhub'
c.JupyterHub.hub_port = 8080
# Persist hub data on volume mounted inside container
@@ -56,3 +56,12 @@ c.NativeAuthenticator.open_signup = True
admin = os.environ.get("JUPYTERHUB_ADMIN")
if admin:
c.Authenticator.admin_users = [admin]
# GPU 和网络配置
c.DockerSpawner.extra_host_config = {
'runtime': 'nvidia'
}
c.DockerSpawner.environment = {
'NVIDIA_DRIVER_CAPABILITIES': 'compute,utility',
'NVIDIA_VISIBLE_DEVICES': 'all'
}