This is an automated email from the ASF dual-hosted git repository.
mhladun pushed a commit to branch 2.5.1-tensor-jupyterlab
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
The following commit(s) were added to refs/heads/2.5.1-tensor-jupyterlab by
this push:
new 339dfb3 fixed jupyterlab service
339dfb3 is described below
commit 339dfb39924a3280b0e7c1e1e4cb11c3ad2e9418
Author: Marian_Hladun <[email protected]>
AuthorDate: Fri Feb 18 10:29:32 2022 +0200
fixed jupyterlab service
---
infrastructure-provisioning/src/general/lib/os/fab.py | 10 +++++-----
.../general/templates/os/debian/jupyterlab-notebook.service | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py
b/infrastructure-provisioning/src/general/lib/os/fab.py
index 75d5c92..0716c63 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -1060,8 +1060,8 @@ def configure_jupyterlab(os_user, jupyterlab_conf_file,
templates_dir, jupyterla
conn.sudo('echo \'c.NotebookApp.cookie_secret = b"{0}"\' >>
{1}'.format(id_generator(), jupyterlab_conf_file))
conn.sudo('''echo "c.NotebookApp.token = u''" >>
{}'''.format(jupyterlab_conf_file))
conn.sudo('echo \'c.KernelSpecManager.ensure_native_kernel =
False\' >> {}'.format(jupyterlab_conf_file))
- #conn.put(templates_dir + 'jupyterlab-notebook.service',
'/tmp/jupyter-notebook.service')
- conn.sudo('cp /root/templates/jupyterlab-notebook.service
/tmp/jupyter-notebook.service')
+ conn.put(templates_dir + 'jupyterlab-notebook.service',
'/tmp/jupyterlab-notebook.service')
+ #conn.sudo('cp /root/templates/jupyterlab-notebook.service
/tmp/jupyter-notebook.service')
#if os.environ['conf_deeplearning_cloud_ami'] == 'true' and
os.environ['application'] == 'deeplearning':
# conn.sudo(
# '''echo "c.NotebookApp.kernel_spec_manager_class =
'environment_kernels.EnvironmentKernelSpecManager'" >> {}'''.format(
@@ -1087,12 +1087,12 @@ def configure_jupyterlab(os_user, jupyterlab_conf_file,
templates_dir, jupyterla
#conn.sudo('sed -i \'/\[Service\]/
a\Environment=\"JAVA_HOME={}\"\' /tmp/jupyterlab-notebook.service'.format(
# java_home))
conn.sudo('cp /tmp/jupyterlab-notebook.service
/etc/systemd/system/jupyterlab-notebook.service')
- conn.sudo('chown -R {0}:{0} /home/{0}/.local'.format(os_user))
- conn.sudo('mkdir -p /mnt/var')
- conn.sudo('chown {0}:{0} /mnt/var'.format(os_user))
conn.sudo("systemctl daemon-reload")
conn.sudo("systemctl enable jupyterlab-notebook")
conn.sudo("systemctl start jupyterlab-notebook")
+ conn.sudo('chown -R {0}:{0} /home/{0}/.local'.format(os_user))
+ conn.sudo('mkdir -p /mnt/var')
+ conn.sudo('chown {0}:{0} /mnt/var'.format(os_user))
conn.sudo('touch
/home/{}/.ensure_dir/jupyter_ensured'.format(os_user))
except Exception as err:
logging.error('Function configure_jupyterlab error:', str(err))
diff --git
a/infrastructure-provisioning/src/general/templates/os/debian/jupyterlab-notebook.service
b/infrastructure-provisioning/src/general/templates/os/debian/jupyterlab-notebook.service
index 4b6556f..cf3fe43 100644
---
a/infrastructure-provisioning/src/general/templates/os/debian/jupyterlab-notebook.service
+++
b/infrastructure-provisioning/src/general/templates/os/debian/jupyterlab-notebook.service
@@ -27,9 +27,9 @@ Type=simple
PIDFile=/var/run/jupyterlab-notebook.pid
ExecStart=/bin/bash -c "/usr/local/bin/jupyter lab"
ExecStop=/bin/bash -c "for i in $(ps aux | grep jupyter | grep -v grep | awk
'{print $2}'); do kill -9 $i; done"
-User=OS_USR
-Group=OS_USR
-WorkingDirectory=/home/OS_USR
+User=datalab-user
+Group=datalab-user
+WorkingDirectory=/home/datalab-user
[Install]
WantedBy=multi-user.target
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]