This is an automated email from the ASF dual-hosted git repository. mykolabodnar pushed a commit to branch DATALAB-2392 in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
commit 2671ad6b674d70be156439e2919194b5453b63bd Author: bodnarmykola <[email protected]> AuthorDate: Thu May 6 17:32:18 2021 +0300 [DataLab-2372] - Local Apache Toree - Scala kernel dies during connection fixed --- infrastructure-provisioning/src/general/lib/os/fab.py | 6 +++--- .../src/jupyter/scripts/configure_jupyter_node.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py index 84f4453..d59a2c8 100644 --- a/infrastructure-provisioning/src/general/lib/os/fab.py +++ b/infrastructure-provisioning/src/general/lib/os/fab.py @@ -206,7 +206,7 @@ def configure_jupyter(os_user, jupyter_conf_file, templates_dir, jupyter_version conn.sudo('echo \'c.NotebookApp.cookie_secret = b"{0}"\' >> {1}'.format(id_generator(), jupyter_conf_file)) conn.sudo('''echo "c.NotebookApp.token = u''" >> {}'''.format(jupyter_conf_file)) conn.sudo('echo \'c.KernelSpecManager.ensure_native_kernel = False\' >> {}'.format(jupyter_conf_file)) - if os.environ['conf_deeplearning_cloud_ami'] == 'true': + 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( jupyter_conf_file)) @@ -606,8 +606,8 @@ def ensure_toree_local_kernel(os_user, toree_link, scala_kernel_path, files_dir, conn.sudo('ln -s /opt/spark/ /usr/local/spark') conn.sudo('jupyter toree install') conn.sudo('mv ' + scala_kernel_path + 'lib/* /tmp/') - conn.put(files_dir + 'toree-assembly-0.3.0.jar', '/tmp/toree-assembly-0.3.0.jar') - conn.sudo('mv /tmp/toree-assembly-0.3.0.jar ' + scala_kernel_path + 'lib/') + #conn.put(files_dir + 'toree-assembly-0.3.0.jar', '/tmp/toree-assembly-0.3.0.jar') + #conn.sudo('mv /tmp/toree-assembly-0.3.0.jar ' + scala_kernel_path + 'lib/') conn.sudo( 'sed -i "s|Apache Toree - Scala|Local Apache Toree - Scala (Scala-' + scala_version + ', Spark-' + spark_version + ')|g" ' + scala_kernel_path + 'kernel.json') diff --git a/infrastructure-provisioning/src/jupyter/scripts/configure_jupyter_node.py b/infrastructure-provisioning/src/jupyter/scripts/configure_jupyter_node.py index 4244825..2791b78 100644 --- a/infrastructure-provisioning/src/jupyter/scripts/configure_jupyter_node.py +++ b/infrastructure-provisioning/src/jupyter/scripts/configure_jupyter_node.py @@ -112,8 +112,8 @@ if __name__ == "__main__": configure_local_spark(jars_dir, templates_dir) # INSTALL JUPYTER KERNELS - print("Install pyspark local kernel for Jupyter") - ensure_pyspark_local_kernel(args.os_user, pyspark_local_path_dir, templates_dir, spark_version) + #print("Install pyspark local kernel for Jupyter") + #ensure_pyspark_local_kernel(args.os_user, pyspark_local_path_dir, templates_dir, spark_version) print("Install py3spark local kernel for Jupyter") ensure_py3spark_local_kernel(args.os_user, py3spark_local_path_dir, templates_dir, spark_version) print("Install Toree-Scala kernel for Jupyter") --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
