Skip to content

juptyerlab-git serverextension does not work if you install/activate it after you start the server #497

Open
@lordravo

Description

@lordravo

Hi,

I am launching a jupyterlab with git, making use of a dataproc initialization action;
For some reason I am not able to clone any repository. I am not sure if that is due to a workspace issue, or an unsuccessfull installation;

My cluster-config:

{
	"region": "us-east1",
	"zone": "us-east1-b",
	"bucket": "..",
	"master_type": "n1-standard-4",
	"worker_type": "n1-standard-4",
	"master_disk_size": 100,
	"worker_disk_size": 50,
	"num_workers": 2,
	"image_version": "1.4",
	"scopes": ["https://www.googleapis.com/auth/cloud-platform"],
	"optional_components": ["ANACONDA", "JUPYTER"],
	"initialization_actions": [
		"gs://tapps-bi-dwh.appspot.com/bi-dataproc/init-actions/init-script-jupyterhub-lab-git.sh"
	]
}

My initialization script:

ROLE=$(/usr/share/google/get_metadata_value attributes/dataproc-role)
if [[ "${ROLE}" == 'Master' ]]; then
    mkdir -p jupyter
    cd /jupyter
    conda upgrade -y -c conda-forge jupyterlab
    nohup jupyter notebook --port 8080 --notebook-dir '/jupyter' &
    nohup jupyter lab --port 8081 --notebook-dir '/jupyter' &>> jupyterlab.log &
    conda install -y -c conda-forge nodejs
    jupyter labextension install @jupyterlab/git
    pip install -e git+https://github.com/jupyterlab/jupyterlab-git.git#egg=jupyterlab_git
    jupyter serverextension enable --py jupyterlab_git --sys-prefix
    jupyter lab build
fi

The error:
image

Any ideas on how to approach this issue?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions