update gpu
This commit is contained in:
@@ -39,7 +39,7 @@ c.DockerSpawner.remove = True
|
|||||||
c.DockerSpawner.debug = True
|
c.DockerSpawner.debug = True
|
||||||
|
|
||||||
# User containers will access hub by container name on the Docker network
|
# 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
|
c.JupyterHub.hub_port = 8080
|
||||||
|
|
||||||
# Persist hub data on volume mounted inside container
|
# Persist hub data on volume mounted inside container
|
||||||
@@ -55,4 +55,13 @@ c.NativeAuthenticator.open_signup = True
|
|||||||
# Allowed admins
|
# Allowed admins
|
||||||
admin = os.environ.get("JUPYTERHUB_ADMIN")
|
admin = os.environ.get("JUPYTERHUB_ADMIN")
|
||||||
if admin:
|
if admin:
|
||||||
c.Authenticator.admin_users = [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'
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user