Missing static files in Jupyterhub Docker image

I want to run a Jupyterhub in an ECS cluster on AWS. I think from the docs that I should be able to do that by running the Docker container published at https://hub.docker.com/r/jupyterhub/jupyterhub, using the instructions from that page:

docker run -p 8000:8000 -d --name jupyterhub jupyterhub/jupyterhub jupyterhub

I am making a minor modification to mount the /srv/jupyterhub from a volume so that I can change the jupyterhub_config.py and have it persist.

When I navigate to the app at http://localhost:8000 all the JS and CSS files are missing; from the logs:

jupyterhub_1  | [W 2019-12-18 16:50:25.917 JupyterHub log:174] 404 GET /hub/static/components/jquery/dist/jquery.min.js (@::ffff: 2.30ms
jupyterhub_1  | [W 2019-12-18 16:50:25.918 JupyterHub log:174] 404 GET /hub/static/components/bootstrap/dist/js/bootstrap.min.js (@::ffff: 2.54ms
jupyterhub_1  | [W 2019-12-18 16:50:25.921 JupyterHub log:174] 404 GET /hub/static/css/style.min.css (@::ffff: 1.33ms
jupyterhub_1  | [W 2019-12-18 16:50:25.922 JupyterHub log:174] 404 GET /hub/static/components/requirejs/require.js (@::ffff: 1.90ms

The /usr/local/share/jupyterhub/static/ directory doesn’t contain the components or css subdirectories.

If I uninstall Jupyterhub from the running container and then re-install it using python3 -m pip install jupyterhub then the CSS files are present and the login screen works as expected.

Am I doing something wrong? Or is there a bug in the Jupyterhub Dockerfile where it builds the wheel in a separate container and then installs it from there?


There are some bugs in the latest Docker images:

Can you try jupyterhub/jupyterhub:1.0.0 instead?

That worked after some tweaks to the jupyterhub_config.py to account for files in /opt/conda/ instead of /usr/local.

@manics thanks for the help.

1 Like