You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by my...@apache.org on 2020/05/27 10:58:21 UTC
[incubator-dlab] branch DLAB-515 updated: [DLAB-515]- Jupyter
kernels connection fixed
This is an automated email from the ASF dual-hosted git repository.
mykolabodnar pushed a commit to branch DLAB-515
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/DLAB-515 by this push:
new 694edd7 [DLAB-515]- Jupyter kernels connection fixed
694edd7 is described below
commit 694edd74945147afe6b28e29cf0b36f11327f0d0
Author: bodnarmykola <bo...@gmail.com>
AuthorDate: Wed May 27 13:58:05 2020 +0300
[DLAB-515]- Jupyter kernels connection fixed
---
infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py | 2 ++
infrastructure-provisioning/src/general/lib/os/fab.py | 3 +++
2 files changed, 5 insertions(+)
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 0ad64dd..990afe4 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
@@ -202,6 +202,8 @@ def ensure_jre_jdk(os_user):
try:
manage_pkg('-y install', 'remote', 'default-jre')
manage_pkg('-y install', 'remote', 'default-jdk')
+ manage_pkg('-y install', 'remote', 'openjdk-8-jdk')
+ manage_pkg('-y install', 'remote', 'openjdk-8-jre')
sudo('touch /home/' + os_user + '/.ensure_dir/jre_jdk_ensured')
except:
sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index 946e61f..fdf62d6 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -182,6 +182,9 @@ def configure_jupyter(os_user, jupyter_conf_file, templates_dir, jupyter_version
http_proxy))
sudo('sed -i \'/\[Service\]/ a\Environment=\"HTTPS_PROXY={}\"\' /tmp/jupyter-notebook.service'.format(
https_proxy))
+ java_home = run("update-alternatives --query java | grep -o \'/.*/java-8.*/jre\'").splitlines()[0]
+ sudo('sed -i \'/\[Service\]/ a\Environment=\"JAVA_HOME={}\"\' /tmp/jupyter-notebook.service'.format(
+ java_home))
sudo('\cp /tmp/jupyter-notebook.service /etc/systemd/system/jupyter-notebook.service')
sudo('chown -R {0}:{0} /home/{0}/.local'.format(os_user))
sudo('mkdir -p /mnt/var')
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org