Hi all, over the summer I developed an extension for JupyterLab and am now trying to get it to work with JupyterHub. I’ve made the extension into a pip package, uploaded it to TestPyPI, and included its installation in my Dockerfile, which looks like this:
ARG BASE_CONTAINER=jupyter/tensorflow-notebook:hub-1.4.2
FROM $BASE_CONTAINER
LABEL maintainer="Texas State EECS Group"
USER root
# Install JupyterLab extension
WORKDIR /home/jovyan
RUN pip install -i https://test.pypi.org/pypi/ --extra-index-url https://pypi.org/simple jupyterlab-power-and-energy
EXPOSE 8888
When I create the image with sudo docker build . -t image-test
, run it using sudo docker run -p 8888:8888 image-test
, and open up JupyterHub in my browser, the extension doesn’t seem to be working properly since the “Measure Energy Usage” button it should add to the notebook toolbar is missing. (In JupyterLab it looks like the attached screenshot). However, if I run jupyter labextension list
in the JupyterHub terminal I can see that it’s installed and enabled. Any ideas about why this might be happening are much appreciated.
The code for the extension is here; the additional backend components that do the actual measuring of energy usage are not included, but we’re not trying to include them in the Docker image at the present time: GitHub - TrevorVillwock/jupyterlab_power_and_energy: A JupyterLab extension that lets users measure the power and energy usage of their code
Testing this on Ubuntu 20.04.2 using WSL 2 running on Windows 10