This is an automated email from the ASF dual-hosted git repository. lfrolov pushed a commit to branch DATALAB-2755 in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
commit 95f2d4e68330a3fe2ff113a0b9c84e8b13951fe9 Author: leonidfrolov <[email protected]> AuthorDate: Tue Apr 19 19:18:29 2022 +0300 [DATALAB-2755]: fixed gcp deeplearning jupyterlab config --- .../src/deeplearning/scripts/configure_deep_learning_node.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/infrastructure-provisioning/src/deeplearning/scripts/configure_deep_learning_node.py b/infrastructure-provisioning/src/deeplearning/scripts/configure_deep_learning_node.py index ceed46bc8..ea2021934 100644 --- a/infrastructure-provisioning/src/deeplearning/scripts/configure_deep_learning_node.py +++ b/infrastructure-provisioning/src/deeplearning/scripts/configure_deep_learning_node.py @@ -95,7 +95,9 @@ def install_itorch(os_user): def configure_jupyterlab_at_gcp_image(os_user, exploratory_name): if not exists(conn, '/home/{}/.ensure_dir/jupyterlab_ensured'.format(os_user)): - jupyter_conf_file = '/home/jupyter/.jupyter/jupyter_notebook_config.py' + #jupyter_conf_file = '/home/jupyter/.jupyter/jupyter_notebook_config.py' + jupyter_conf_file = '/home/{}/.jupyter/jupyter_lab_config.py'.format(os_user) + conn.run('/opt/conda/bin/python3.7 /opt/conda/bin/jupyter-lab --generate-config') conn.sudo('''bash -l -c 'sed -i "s|c.NotebookApp|#c.NotebookApp|g" {}' '''.format(jupyter_conf_file)) conn.sudo('''bash -l -c "echo 'c.NotebookApp.ip = \\"0.0.0.0\\" ' >> {}" '''.format(jupyter_conf_file)) conn.sudo('''bash -l -c "echo 'c.NotebookApp.port = 8888' >> {}" '''.format(jupyter_conf_file)) @@ -106,6 +108,7 @@ def configure_jupyterlab_at_gcp_image(os_user, exploratory_name): conn.sudo('''bash -l -c "echo 'c.NotebookApp.cookie_secret = b\\"{0}\\"' >> {1}" '''.format(id_generator(), jupyter_conf_file)) conn.sudo('''bash -l -c "echo \\"c.NotebookApp.token = u''\\" >> {}" '''.format(jupyter_conf_file)) + conn.sudo('cp /home/{}/.jupyter/jupyter_lab_config.py /home/jupyter/.jupyter/jupyter_notebook_config.py'.format(os_user)) conn.sudo('systemctl restart jupyter') conn.sudo('touch /home/{}/.ensure_dir/jupyterlab_ensured'.format(os_user)) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
