JupyterHub + Docker生成器

问题描述

我正在尝试使用docker-spawner来建立JupyterHub。登录到JupyterHub后,出现以下错误

500 : Internal Server Error
Error in Authenticator.pre_spawn_start: ChunkedEncodingError ('Connection broken: IncompleteRead(0 bytes read)',IncompleteRead(0 bytes read))
You can try restarting your server from the home page.

我的JupyterHub配置如下:

from jupyterhub.auth import Authenticator

class DictionaryAuthenticator(Authenticator):

    passwords = {'max':'123'}
        
    async def authenticate(self,handler,data):
        if self.passwords.get(data['username']) == data['password']:
            return data['username']


# docker image tag in the docker registry
c.DockerSpawner.image = 'jupyterhub/singleuser:latest' 

 # listen on all interfaces
c.DockerSpawner.host_ip = "0.0.0.0"

c.DockerSpawner.network_name = 'jupyterhub'
c.JupyterHub.spawner_class = 'dockerspawner.DockerSpawner'
c.JupyterHub.authenticator_class = DictionaryAuthenticator

这是我的Dockerfile的内容

FROM python:3.7
RUN pip3 install \
    jupyterhub==1.0.0 \
    'notebook>=5.0,<=6.0'

# create a user,since we don't want to run as root
RUN useradd -m max
ENV HOME=/home/max
workdir $HOME
USER max


CMD ["jupyterhub-singleuser"]

如何解决错误

谢谢您的帮助!

解决方法

我能够解决问题。在我看来,Docker-Spawner仅适用于Docker 2.3.0.5版(MacOS)。

如果有人遇到相同的问题->只需降级。

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...