jupyterlab-github icon indicating copy to clipboard operation
jupyterlab-github copied to clipboard

Cannot set default github repo during docker build

Open alexlicohen opened this issue 6 years ago • 3 comments

Hi all, I'm trying to pre-load the default github repo that is shown when a docker is loaded up using the something like the following in my dockerfile (and needless to say, not working):

#Set up github access (this is temporary; real version will request key at container runtime)
RUN echo "c.GitHubConfig.access_token = 'ToBeReplacedWithLineInRunTimeShellScript'" >> ~/.jupyter/jupyter_notebook_config.py

RUN mkdir -p ~/.jupyter/lab/user-settings/@jupyterlab/github && \
    echo "{\n  "defaultRepo": "alexlicohen/script-toolbox"\n}" >> ~/.jupyter/lab/user-settings/@jupyterlab/github/drive.jupyterlab-settings

alexlicohen avatar May 05 '19 02:05 alexlicohen

Sorry for the slow reply @alexlicohen. If this is still a problem, there are a few things we can check:

  1. Does your settings file work in a non-dockerized setting (e.g, just running jupyter lab)?
  2. In the dockerized lab, do you see your settings when you open them in the Advanced Settings Editor?
  3. Are there any schema validation errors, either in the notebook server logs, or in the browser Javascript console?

ian-r-rose avatar Jul 24 '19 00:07 ian-r-rose

I am also working on something similar, Instead of going to advanced settings and setting a default repo every time the server in launched, I want to set default repo in the server configuration file or in dockerfile (image) so its loaded directly as default when server notebook in launched. If someone has an input, it would be very helpful !

rupanshi-chawda avatar Jan 04 '22 12:01 rupanshi-chawda

The settings should be written to overrides.json file in an appropriate directory, see https://github.com/jupyterlab/jupyterlab-plugin-playground/pull/26 for an example.

krassowski avatar Jan 04 '22 12:01 krassowski