Jupyter notebook Jupyterhub K8s-将用户从Jovyan更改为NB_用户的问题

Jupyter notebook Jupyterhub K8s-将用户从Jovyan更改为NB_用户的问题,jupyter-notebook,jupyter,jupyterhub,Jupyter Notebook,Jupyter,Jupyterhub,以root用户身份运行容器后,获取以下错误日志: 将username设置为:user1 将主目录重新定位到/home/user1 mv:无法将“/home/jovyan”移动到“/home/user1”:设备或资源正忙 Everything works well until we wanted to set the NB_USER to the logged in user. When changed the config to run as root and start.sh as defau

以root用户身份运行容器后,获取以下错误日志:
将username设置为:user1 将主目录重新定位到/home/user1 mv:无法将“/home/jovyan”移动到“/home/user1”:设备或资源正忙

Everything works well until we wanted to set the NB_USER to the logged in user. When changed the config to run as root and start.sh as default cmd, getting the below error in the log and the container is failing to start. Any help is highly appreciated
Here is the config.yaml
singleuser:
defaultUrl: "/lab"
uid: 0
fsGid: 0
hub:
extraConfig: |
c.KubeSpawner.args = ['--allow-root']
c.Spawner.cmd = ['start.sh','jupyterhub-singleuser']
def notebook_dir_hook(spawner):
spawner.environment = {'NB_USER':spawner.user.name, 'NB_UID':'1500'}
c.Spawner.pre_spawn_hook = notebook_dir_hook
from kubernetes import client
def modify_pod_hook(spawner, pod):
pod.spec.containers[0].security_context = client.V1SecurityContext(
privileged=True,
capabilities=client.V1Capabilities(
add=['SYS_ADMIN']
)
)`enter code here`
return pod
c.KubeSpawner.modify_pod_hook = modify_pod_hook