You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by mh...@apache.org on 2022/02/17 08:51:38 UTC

[incubator-datalab] branch 2.5.1-tensor-jupyterlab updated: Jupyterlab and tensorflow lite installation as venv pip packages

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 9d50f4e  Jupyterlab and tensorflow lite installation as venv pip packages
9d50f4e is described below

commit 9d50f4e4cb3e88da0fff4399d628ccab0560b7ea
Author: Marian_Hladun <ma...@epam.com>
AuthorDate: Thu Feb 17 10:46:55 2022 +0200

    Jupyterlab and tensorflow lite installation as venv pip packages
---
 .../src/general/lib/os/debian/notebook_lib.py                | 12 ++++++++++++
 .../src/general/scripts/aws/tensor-jupyterlab_configure.py   |  2 +-
 .../scripts/configure_tensor-jupyterlab_node.py              |  5 ++++-
 3 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py b/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
index cfa4c97..3bf46f2 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
@@ -400,6 +400,18 @@ def ensure_venv_libs(os_user, libs):
         datalab.fab.install_venv_pip_pkg(libs)
         datalab.fab.conn.sudo('touch /home/' + os_user + '/.ensure_dir/venv_libs_ensured')
 
+
+def ensure_venv_juplab(os_user, libs):
+    if not exists(datalab.fab.conn, '/home/' + os_user + '/.ensure_dir/venv_juplab_ensured'):
+        datalab.fab.install_venv_pip_pkg(libs, '3.2.9')
+        datalab.fab.conn.sudo('touch /home/' + os_user + '/.ensure_dir/venv_libs_ensured')
+
+def ensure_venv_tensorlite(os_user, libs):
+    if not exists(datalab.fab.conn, '/home/' + os_user + '/.ensure_dir/venv_juplab_ensured'):
+        datalab.fab.install_venv_pip_pkg(libs, '2.5.0')
+        datalab.fab.conn.sudo('touch /home/' + os_user + '/.ensure_dir/venv_libs_ensured')
+
+
 def ensure_pytorch(os_user, gpu=True):
     if not exists(datalab.fab.conn, '/home/' + os_user + '/.ensure_dir/pytorch_ensured'):
         if gpu:
diff --git a/infrastructure-provisioning/src/general/scripts/aws/tensor-jupyterlab_configure.py b/infrastructure-provisioning/src/general/scripts/aws/tensor-jupyterlab_configure.py
index 0810e83..cdd3f86 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/tensor-jupyterlab_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/tensor-jupyterlab_configure.py
@@ -140,7 +140,7 @@ if __name__ == "__main__":
 
     # updating repositories & installing python packages
     try:
-        logging.info('[INSTALLING PREREQUISITES TO TENSOR NOTEBOOK INSTANCE]')
+        logging.info('[INSTALLING PREREQUISITES TO JUPYTERLAB TENSORFLOW NOTEBOOK INSTANCE]')
         params = "--hostname {} --keyfile {} --user {} --region {} --edge_private_ip {}". \
             format(instance_hostname, keyfile_name, notebook_config['datalab_ssh_user'], os.environ['aws_region'],
                    edge_instance_private_ip)
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 fef030a..a74faff 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
@@ -155,7 +155,10 @@ if __name__ == "__main__":
     ensure_venv_libs(args.os_user, venv_libs)
 
     print("Install jupyterlab")
-    ensure_venv_libs(args.os_user, 'jupyterlab')
+    ensure_venv_juplab(args.os_user, 'jupyterlab')
+
+    print("Install tensorflow lite")
+    ensure_venv_tensorlite(args.os_user, 'tflite')
 
     #POST INSTALLATION PROCESS
     print("Updating pyOpenSSL library")

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