You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by lf...@apache.org on 2022/04/19 16:18:43 UTC

[incubator-datalab] branch DATALAB-2755 created (now 95f2d4e68)

This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a change to branch DATALAB-2755
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git


      at 95f2d4e68 [DATALAB-2755]: fixed gcp deeplearning jupyterlab config

This branch includes the following new commits:

     new 95f2d4e68 [DATALAB-2755]: fixed gcp deeplearning jupyterlab config

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org


[incubator-datalab] 01/01: [DATALAB-2755]: fixed gcp deeplearning jupyterlab config

Posted by lf...@apache.org.
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 <fr...@gmail.com>
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: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org