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 d5d05cf  Jupyterlab config
d5d05cf is described below

commit d5d05cfc8aa70aab7ac2c566f7d1041cb91cd9a5
Author: Marian_Hladun <[email protected]>
AuthorDate: Fri Feb 18 12:27:41 2022 +0200

    Jupyterlab config
---
 infrastructure-provisioning/src/general/lib/os/fab.py              | 7 ++++---
 .../tensor-jupyterlab/scripts/configure_tensor-jupyterlab_node.py  | 5 ++++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py 
b/infrastructure-provisioning/src/general/lib/os/fab.py
index 0716c63..51bd7f7 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -1090,9 +1090,9 @@ def configure_jupyterlab(os_user, jupyterlab_conf_file, 
templates_dir, jupyterla
             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('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))
@@ -1186,6 +1186,7 @@ def remove_unexisting_kernel(os_user):
     if not exists(conn, 
'/home/{}/.ensure_dir/unexisting_kernel_removed'.format(os_user)):
         try:
             conn.sudo('jupyter-kernelspec remove -f python3')
+            conn.sudo('jupyter kernelspec uninstall -y python3')
             conn.sudo('touch 
/home/{}/.ensure_dir/unexisting_kernel_removed'.format(os_user))
         except Exception as err:
             logging.error('Function remove_unexisting_kernel error:', str(err))
diff --git 
a/infrastructure-provisioning/src/tensor-jupyterlab/scripts/configure_tensor-jupyterlab_node.py
 
b/infrastructure-provisioning/src/tensor-jupyterlab/scripts/configure_tensor-jupyterlab_node.py
index d4354fd..1b14876 100644
--- 
a/infrastructure-provisioning/src/tensor-jupyterlab/scripts/configure_tensor-jupyterlab_node.py
+++ 
b/infrastructure-provisioning/src/tensor-jupyterlab/scripts/configure_tensor-jupyterlab_node.py
@@ -156,7 +156,7 @@ if __name__ == "__main__":
 
     print("Install python venv required libs")
     ensure_venv_libs(args.os_user, venv_libs)
-    datalab.fab.install_venv_pip_pkg(args.os_user, '--extra-index-url 
https://google-coral.github.io/py-repo/ tflite_runtime==2.5.0')
+    datalab.fab.install_venv_pip_pkg('--extra-index-url 
https://google-coral.github.io/py-repo/ tflite_runtime==2.5.0')
     #ensure_venv_libs(args.os_user, '--extra-index-url 
https://google-coral.github.io/py-repo/ tflite_runtime==2.5.0')
 
 
@@ -164,4 +164,7 @@ if __name__ == "__main__":
     print("Updating pyOpenSSL library")
     update_pyopenssl_lib(args.os_user)
 
+    print("Removing unexisting kernels")
+    remove_unexisting_kernel(args.os_user)
+
     conn.close()

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to