jupyterlab-github
jupyterlab-github copied to clipboard
Cannot set default github repo during docker build
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
Sorry for the slow reply @alexlicohen. If this is still a problem, there are a few things we can check:
- Does your settings file work in a non-dockerized setting (e.g, just running
jupyter lab)? - In the dockerized lab, do you see your settings when you open them in the
Advanced Settings Editor? - Are there any schema validation errors, either in the notebook server logs, or in the browser Javascript console?
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 !
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.