You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by lf...@apache.org on 2021/11/04 15:58:46 UTC

[incubator-datalab] branch develop updated: [DATALAB-2544]: Jupyter virtual environment fixes

This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git


The following commit(s) were added to refs/heads/develop by this push:
     new 1c9f7cb  [DATALAB-2544]: Jupyter virtual environment fixes
     new d2bb377  Merge pull request #1324 from owlleg6/develop
1c9f7cb is described below

commit 1c9f7cb1f2f71854ca290e5053e92c5861aac529
Author: oleh_mykolaishyn <ow...@gmail.com>
AuthorDate: Thu Nov 4 17:55:43 2021 +0200

    [DATALAB-2544]: Jupyter virtual environment fixes
---
 infrastructure-provisioning/src/general/lib/os/fab.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index c2e9833..f86b495 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -1021,12 +1021,10 @@ def ensure_py3spark_local_kernel(os_user, py3spark_local_path_dir, templates_dir
             conn.sudo('mkdir -p ' + py3spark_local_path_dir)
             conn.sudo('touch ' + py3spark_local_path_dir + 'kernel.json')
             conn.put(templates_dir + 'py3spark_local_template.json', '/tmp/py3spark_local_template.json')
-            conn.sudo(
-                '''bash -l -c "PYJ=`find /opt/spark/ -name '*py4j*.zip' | tr '\\n' ':' | sed 's|:$||g'`; sed -i 's|PY4J|'$PYJ'|g' /tmp/py3spark_local_template.json" ''')
+            conn.sudo('''bash -l -c "sed -i \"s:PY4J:$(find /opt/spark/ -name '*py4j*.zip'):g\" /tmp/py3spark_local_template.json" ''')
             conn.sudo('sed -i "s|PYTHON_VENV_PATH|' + python_venv_path + '|g" /tmp/py3spark_local_template.json')
             conn.sudo('sed -i "s|PYTHON_VENV_VERSION|' + python_venv_version + '|g" /tmp/py3spark_local_template.json')
-            conn.sudo('sed -i "s|PYTHON_VENV_SHORT_VERSION|' + python_venv_version[
-                                                               :3] + '|g" /tmp/py3spark_local_template.json')
+            conn.sudo('sed -i "s|PYTHON_VENV_SHORT_VERSION|' + python_venv_version[:3] + '|g" /tmp/py3spark_local_template.json')
             conn.sudo('sed -i "s|SP_VER|' + spark_version + '|g" /tmp/py3spark_local_template.json')
             conn.sudo(
                 'sed -i \'/PYTHONPATH\"\:/s|\(.*\)"|\\1/home/{0}/caffe/python:/home/{0}/pytorch/build:"|\' /tmp/py3spark_local_template.json'.format(

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