I’m creating a course where each student is given a virtual machine in a Kubernetes cluster with a Docker image based on the Jupyter Notebook Deep Learning Stack. The students work in a Jupyter Lab environment, and I would like to disable downloads.
I copied this file to the to the /opt/conda/etc/jupyter/labconfig/ directory on the image, but the downloading still works. I’ve tried disabling it manually:
I can disable other things in page_config.json, like the terminal. And I’ve been able to disable other downloads by adding an overrides.json to /opt/conda/share/jupyter/lab/settings/. So I’m not sure why this isn’t working. Is there something I’m missing here?
Like a jupyter lab build step? No, and that might be the problem. Where in the Dockerfile would I put that? At the very end? Does that matter if I’m using the page_config.json file?
I don’t think the build step should be necessary, but sometimes people have it in their Dockerfile and it leads to a failure and some weird things happen, always worth checking.
So after disabling the extension you should see it in jupyter labextension list. It does not seem to be there in your case indeed. For me it looks like this:
$ jupyter labextension list
JupyterLab v3.2.0rc0
/some/path/.local/share/jupyter/labextensions
nbdime-jupyterlab v2.1.0 enabled OK
/some/path/jupyter/labextensions
spreadsheet-editor v0.6.1 enabled OK (python, jupyterlab-spreadsheet-editor)
jupyterlab-citation-manager v0.1.2 enabled OK (python, jupyterlab-citation-manager)
...
Other labextensions (built into JupyterLab)
app dir: /some/path
Disabled extensions:
@jupyterlab/docmanager-extension:download
Have you tired putting jupyter labextension disable @jupyterlab/docmanager-extension:download into the Dockerfile?
Also in Docker file
RUN jupyter labextension disable @jupyterlab/docmanager-extension:download
&& jupyter labextension disable @jupyterlab/filebrowser-extension:download
Also i have checked via notebook terminal it is saying lab extension disabled but not working
base) jovyan@rntest-0:/opt/conda/etc/jupyter/labconfig$ jupyter labextension list
JupyterLab v3.0.16
/opt/conda/share/jupyter/labextensions
jupyter-matplotlib v0.9.0 enabled OK
nbdime-jupyterlab v2.1.0 enabled OK
jupyterlab-plotly v5.3.1 enabled OK
@jupyterlab/git v0.30.1 enabled OK (python, jupyterlab-git)
@jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)
Other labextensions (built into JupyterLab)
app dir: /opt/conda/share/jupyter/lab
Disabled extensions:
@jupyterlab/docmanager-extension:download
@jupyterlab/filebrowser-extension:download
(base) jovyan@rntest-0:/opt/conda/etc/jupyter/labconfig$
Above issue occurred due to jupyter --version . I have update the jupyter version in docker file to RUN pip install jupyterlab==3.1.0a5
And RUN below command in docker file too
RUN jupyter labextension disable @jupyterlab/docmanager-extension:download
&& jupyter labextension disable @jupyterlab/filebrowser-extension:download as stated by ncgoodbody in above discussion . This changes disable the dowload functionality and right click download